penguinV icon indicating copy to clipboard operation
penguinV copied to clipboard

Extra randomisation at the start of unit tests

Open ihhub opened this issue 6 years ago • 1 comments

Our unit tests locate in test/unit_tests directory. We have a framework class to retrieve and run all tests which locates in test/unit_tests/unit_test_framework.cpp. In int UnitTestFramework::run() const we need to add an extra code for randomisation so unit tests won't repeat the same tests over each call.

ihhub avatar Jan 04 '19 03:01 ihhub

Include std::srand(std::time(nullptr)); line before running the tests with needed #include <ctime> header inclusion.

ihhub avatar Jan 04 '19 05:01 ihhub