Skip to content

Commit c7faa79

Browse files
committed
Add missing test in TimeSourceTest
1 parent 49dee12 commit c7faa79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/core/TimeSourceTest.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ TEST_SUITE("TimeSourceTest") {
2525
CHECK(stopCount < (startCount + microToNano(200)));
2626
}
2727

28+
TEST_CASE("delta() should not increase but return difference since last time") {
29+
TimeSource timeSource;
30+
31+
// Not sure if this is reliable, but works atm
32+
for (int i = 0; i < 10; i++) {
33+
CHECK(timeSource.delta() < 1000);
34+
}
35+
}
36+
2837
TEST_CASE("reset() should reset delta") {
2938
TimeSource timeSource;
3039

0 commit comments

Comments
 (0)