| 4 | #include "base/timer.hpp" |
| 5 | |
| 6 | UNIT_TEST(Timer_Seconds) |
| 7 | { |
| 8 | base::Timer timer; |
| 9 | |
| 10 | double t1 = timer.ElapsedSeconds(); |
| 11 | double s = 0.0; |
| 12 | for (int i = 0; i < 10000000; ++i) |
| 13 | s += i * 0.01; |
| 14 | double t2 = timer.ElapsedSeconds(); |
| 15 | |
| 16 | TEST_NOT_EQUAL(s, 0.0, ("Fictive, to prevent loop optimization")); |
| 17 | TEST_NOT_EQUAL(t1, t2, ("Timer values should not be equal")); |
| 18 | } |
| 19 | |
| 20 | UNIT_TEST(Timer_CurrentStringTime) |
| 21 | { |
nothing calls this directly
no test coverage detected