21 #include <gmock/gmock.h> 30 EXPECT_EQ(system, system->getInstance());
36 auto period = 1000000ll;
37 ASSERT_EQ(period, system->getPeriod());
42 auto period = 1000000ll;
43 int retval = system->setPeriod(period);
45 EXPECT_EQ(period, system->getPeriod());
47 retval = system->setPeriod(period);
48 EXPECT_EQ(period, system->getPeriod());
54 EXPECT_CALL(event, callback()).Times(::testing::AtLeast(1));
55 auto retval = system->postEvent(&event,
true);
64 using namespace std::chrono_literals;
67 EXPECT_CALL(device, read()).Times(::testing::AtLeast(10));
68 EXPECT_CALL(device, write()).Times(::testing::AtLeast(10));
69 std::this_thread::sleep_for(1s);
77 using namespace std::chrono_literals;
80 EXPECT_CALL(thread, execute()).Times(::testing::AtLeast(10));
81 std::this_thread::sleep_for(1s);