Commit ef4c70a3 authored by Juho Snellman's avatar Juho Snellman

Document methods, separate non-trivial implementations from declarations

- Also fix integer overflow issue in ticks_to_next_event
parent 1133c71f
......@@ -155,7 +155,8 @@ bool test_ticks_to_next_event() {
// No timers scheduled, return the max value.
EXPECT_INTEQ(timers.ticks_to_next_event(100), 100);
EXPECT_INTEQ(timers.ticks_to_next_event(0), 0);
EXPECT_INTEQ(timers.ticks_to_next_event(),
std::numeric_limits<Tick>::max());
for (int i = 0; i < 10; ++i) {
// Just vanilla tests
......@@ -204,6 +205,10 @@ bool test_ticks_to_next_event() {
timers.advance(32);
}
timer.cancel();
EXPECT_INTEQ(timers.ticks_to_next_event(),
std::numeric_limits<Tick>::max());
return true;
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment