|
|
@ -42,30 +42,24 @@ TEST_F(Issue840, HasNotRegressed) {
|
|
|
|
auto state = RunCycle();
|
|
|
|
auto state = RunCycle();
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
EXPECT_EQ(
|
|
|
|
EXPECT_THAT(state->SystemControlReports(0), Contains(System_PowerDown));
|
|
|
|
state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
System_PowerDown.getKeyCode());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sim_.Press(3, 5); // Press System_Sleep
|
|
|
|
sim_.Press(3, 5); // Press System_Sleep
|
|
|
|
state = RunCycle();
|
|
|
|
state = RunCycle();
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
EXPECT_EQ(
|
|
|
|
EXPECT_THAT(state->SystemControlReports(0), Contains(System_Sleep));
|
|
|
|
state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
System_Sleep.getKeyCode());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sim_.Release(2, 1); // Release System_PowerDown
|
|
|
|
sim_.Release(2, 1); // Release System_PowerDown
|
|
|
|
state = RunCycle();
|
|
|
|
state = RunCycle();
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 0);
|
|
|
|
EXPECT_EQ(state->SystemControlReports().size(), 0);
|
|
|
|
|
|
|
|
|
|
|
|
sim_.Release(3, 5); // Release System_Sleep
|
|
|
|
sim_.Release(3, 5); // Release System_Sleep
|
|
|
|
state = RunCycle();
|
|
|
|
state = RunCycle();
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
EXPECT_EQ(
|
|
|
|
EXPECT_THAT(state->SystemControlReports(0), IsNull());
|
|
|
|
state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
0 /* null report */);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state = RunCycle();
|
|
|
|
state = RunCycle();
|
|
|
|
|
|
|
|
|
|
|
@ -77,33 +71,25 @@ TEST_F(Issue840, HasNotRegressed) {
|
|
|
|
// auto state = RunCycle();
|
|
|
|
// auto state = RunCycle();
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// EXPECT_EQ(
|
|
|
|
// EXPECT_THAT(state->SystemControlReports(0), Contains(System_PowerDown));
|
|
|
|
// state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
// System_PowerDown.getKeyCode());
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// sim_.Press(3, 5); // Press System_Sleep
|
|
|
|
// sim_.Press(3, 5); // Press System_Sleep
|
|
|
|
// state = RunCycle();
|
|
|
|
// state = RunCycle();
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// EXPECT_EQ(
|
|
|
|
// EXPECT_THAT(state->SystemControlReports(0), Contains(System_Sleep));
|
|
|
|
// state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
// System_Sleep.getKeyCode());
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// sim_.Release(2, 1); // Release System_PowerDown
|
|
|
|
// sim_.Release(2, 1); // Release System_PowerDown
|
|
|
|
// state = RunCycle();
|
|
|
|
// state = RunCycle();
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// EXPECT_EQ(
|
|
|
|
// EXPECT_THAT(state->SystemControlReports(0), IsNull());
|
|
|
|
// state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
// 0 /* null report */);
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// sim_.Release(3, 5); // Release System_Sleep
|
|
|
|
// sim_.Release(3, 5); // Release System_Sleep
|
|
|
|
// state = RunCycle();
|
|
|
|
// state = RunCycle();
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// ASSERT_EQ(state->SystemControlReports().size(), 1);
|
|
|
|
// EXPECT_EQ(
|
|
|
|
// EXPECT_THAT(state->SystemControlReports(0), IsNull());
|
|
|
|
// state->SystemControlReports(0).Key(),
|
|
|
|
|
|
|
|
// 0 /* null report */);
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// state = RunCycle();
|
|
|
|
// state = RunCycle();
|
|
|
|
//
|
|
|
|
//
|
|
|
|