Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5bec3d2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove warning: vehicle RecurrentTimer_test.cpp"

parents a652f5fc ce996783
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -35,11 +35,11 @@ TEST(RecurrentTimerTest, oneInterval) {
    auto counterRef = std::ref(counter);
    auto counterRef = std::ref(counter);
    RecurrentTimer timer([&counterRef](const std::vector<int32_t>& cookies) {
    RecurrentTimer timer([&counterRef](const std::vector<int32_t>& cookies) {
        ASSERT_EQ(1u, cookies.size());
        ASSERT_EQ(1u, cookies.size());
        ASSERT_EQ(0xDeadBeef, cookies.front());
        ASSERT_EQ(0xdead, cookies.front());
        counterRef.get()++;
        counterRef.get()++;
    });
    });


    timer.registerRecurrentEvent(milliseconds(1), 0xDeadBeef);
    timer.registerRecurrentEvent(milliseconds(1), 0xdead);
    std::this_thread::sleep_for(milliseconds(100));
    std::this_thread::sleep_for(milliseconds(100));
    ASSERT_EQ_WITH_TOLERANCE(100, counter.load(), 20);
    ASSERT_EQ_WITH_TOLERANCE(100, counter.load(), 20);
}
}