UnitTest Y U NO use CriticalSection?


#1

The Array returned by UnitTest::getAllTests is missing a CriticalSection in the template argument list?


#2

The tests were never designed to be multi-threaded… If you’ve got a batch of custom tests that you need to run in parallel, maybe it’d be cleaner to just create multiple UnitTestRunner objects for each thread?


#3

But you used a CriticalSection in the other array, for the TestResult.


#4

Well, the threading model is for the tests to run on a background thread, while a GUI perhaps displays the results and status. So the result list does need to be thread-safe, but the list of tests shouldn’t change while it’s running.