1 #include "test_fixture.h"
2 #include "gmock/gmock.h"
3 #include "test_driver.h"
4 #include "test_matrix.h"
8 using testing::AnyNumber;
10 using testing::Between;
12 void TestFixture::SetUpTestCase() {
14 EXPECT_CALL(driver, send_keyboard_mock(_));
18 void TestFixture::TearDownTestCase() {
21 TestFixture::TestFixture() {
24 TestFixture::~TestFixture() {
27 // Run for a while to make sure all keys are completely released
28 // Should probably wait until tapping term etc, has timed out
29 EXPECT_CALL(driver, send_keyboard_mock(_)).Times(AnyNumber());
30 for (int i=0; i<100; i++) {
33 testing::Mock::VerifyAndClearExpectations(&driver);
34 // Verify that the matrix really is cleared
35 EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(Between(0, 1));