| 381 | } |
| 382 | |
| 383 | IGNORE_TEST(TestRegistry, shuffleTestList) |
| 384 | { |
| 385 | UT_PTR_SET(PlatformSpecificRand, getZero); |
| 386 | myRegistry->addTest(test3); |
| 387 | myRegistry->addTest(test2); |
| 388 | myRegistry->addTest(test1); |
| 389 | |
| 390 | UtestShell* first_before = myRegistry->getFirstTest(); |
| 391 | UtestShell* second_before = first_before->getNext(); |
| 392 | UtestShell* third_before = second_before->getNext(); |
| 393 | |
| 394 | CHECK_TRUE(first_before == test1); |
| 395 | CHECK_TRUE(second_before == test2); |
| 396 | CHECK_TRUE(third_before == test3); |
| 397 | CHECK_TRUE(third_before->getNext() == NULLPTR); |
| 398 | |
| 399 | // shuffle always with element at index 0: [1] 2 [3] --> [3] [2] 1 --> 2 3 1 |
| 400 | myRegistry->shuffleTests(0); |
| 401 | |
| 402 | UtestShell* first_after = myRegistry->getFirstTest(); |
| 403 | UtestShell* second_after = first_after->getNext(); |
| 404 | UtestShell* third_after = second_after->getNext(); |
| 405 | |
| 406 | CHECK_TRUE(first_after == test2); |
| 407 | CHECK_TRUE(second_after == test3); |
| 408 | CHECK_TRUE(third_after == test1); |
| 409 | CHECK_TRUE(third_after->getNext() == NULLPTR); |
| 410 | } |
| 411 | |
| 412 | TEST(TestRegistry, reverseTests) |
| 413 | { |
nothing calls this directly
no test coverage detected