penguinV
penguinV copied to clipboard
Extra randomisation at the start of unit tests
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.
Include std::srand(std::time(nullptr)); line before running the tests with needed #include <ctime> header inclusion.