Skip to content

Releases: Piwimau/SCUnit

0.3.0

14 Jan 13:48
Compare
Choose a tag to compare

See the full changelog.

Features

  • Added the ability to randomize the order in which suites and tests are executed (3cedb38). The default is sequential (--order=sequential), which executes suites and tests in the order they were originally defined. By specifying the option --order=random for the test executable, the order is randomized, which might help with finding unintentional dependencies between different suites and tests. The seed used for the run is printed out at the end and can be input again using the option --seed=<seed> to reproduce the results.

    --- Summary ---
    
    Suites: 1 Passed (100.00%), 0 Failed (0.00%), 1 Total
    Tests: 67 Passed (100.00%), 0 Skipped (0.00%), 0 Failed (0.00%), 67 Total
    Wall: 6.123 ms, CPU: 0.000 ns
    
    Note: Suites and tests were executed in a random order.
    Specify '--seed=42' to reproduce this run.
    
  • Added a simple pseudorandom number generator (PRNG) based on the xoshiro256** variant (3cedb38).

Changes

  • Removed the extensive file comments to prevent them from getting out of sync (60aa47c). They provided little value, as they mostly repeated what was already specified in the documentation. More documentation and examples may be added in the future.

  • Revised and improved the error handling all around the library (0616d0f, d06feb1). This results in some breaking changes to the function signatures, but makes the library a bit more uniform and ergonomic to use. The following now applies:

    • Pointers are generally assumed to be valid (i. e. not equal to nullptr and pointing to valid, allocated memory) unless specified otherwise.

    • If an error code provides little extra value to indicate a failure, it is omitted and the return value of a function is used instead (if possible).

      SCUnitTimer* scunit_timer_new();
    • If a function has a procedural character (i. e. called primarily for its side-effect), the return value of the function is used to return an error code.

      SCUnitError scunit_timer_start(SCUnitTimer* timer);
    • If the primary goal of a function is to compute or return a value, the error code is placed as the last out parameter.

      SCUnitMeasurement scunit_timer_getWallTime(const SCUnitTimer* timer, SCUnitError* error);
  • Improved the parsing of the command line arguments to support widely used conventions (fe920fb). This adds a new dependency, the GNU extension getopt_long().

  • Renamed the option --colored-output to --color and the possible arguments disabled to never and enabled to always to follow widely used conventions (1ee265a). The corresponding functions for getting and setting the colored output in code were moved from the print module to the main scunit module.

  • Splitted scunit_main() from <SCUnit/scunit.h> into two separate functions, scunit_parseArguments() and scunit_executeSuites(), which can now be called any number of times (3cedb38).

Fixes

  • Fixed various small issues and inconsistencies in the documentation and source code (9bcf8b6, 1e1bcf0, 586267b, 4a041a3).
  • Ensured the proper initialization and deinitialization of SCUnit even if scunit_executeSuites() is not explicitly called (3cedb38).

0.2.1

31 Dec 00:58
Compare
Choose a tag to compare

See the full changelog.

Changes

  • Minor updates to the documentation (3939b8c).
  • Removed unnecessary writes in deallocation functions (8b3f16b).

Fixes

  • Replaced some calls to SCUNIT_CALLOC() with SCUNIT_MALLOC() and empty-initialization to avoid trap representations (abeb1ea).

0.2.0

24 Dec 12:08
Compare
Choose a tag to compare

See the full changelog.

Features

  • Added the ability to query the version information of SCUnit programatically (see scunit_getVersion() in <SCUnit/scunit.h>) or by passing an option (-v or --version) to the test executable (4f608e4).

Changes

  • Minor improvements to the SCUnit logo (dbee3a9, 221098d, 8a49d90, f711782).
  • Replaced some macros by proper constants (89f1a8f).
  • Revised README.md (f6d259c).
  • Simplified the output format by removing the special handling of edge cases (c1a1845).
  • Renamed various macros, functions and variables for reasons of consistency (5f5f97f).

Fixes

  • Fixed a missing deallocation in the example shown in the README.md (a549af7).
  • Fixed a possible divide by zero error and incorrect handling of format specifiers in the summary output (fe6cf38).

0.1.1

20 Dec 14:42
Compare
Choose a tag to compare

See the full changelog.

Changes

  • Reformatted and renamed a few things for reasons of consistency (1211921).
  • Improved and clarified the documentation (5cdb0ef).
  • Simplified the display of context lines (3ab8474).

0.1.0

19 Dec 22:42
Compare
Choose a tag to compare

Initial release of SCUnit.