File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ The issue #16 changes its public member function. But it is referred internally
1515### Fixed
1616- [ Issue #11 ] ( https://github.com/suikan4github/rpp_driver/issues/11 ) Fails to compile in MSVC.
1717- [ Issue #17 ] ( https://github.com/suikan4github/rpp_driver/issues/17 ) The mock of the GpioBasic has the wrong definition.
18+ - [ Issue #18 ] ( https://github.com/suikan4github/rpp_driver/issues/18 ) The constructor of the MockI2sSlaveDuplex.hpp is missing.
1819### Security
1920### Known Issue
2021
Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ class I2sSlaveDuplex {
153153// GCOVR_EXCL_START
154154class MockI2sSlaveDuplex : public I2sSlaveDuplex {
155155 public:
156+ MockI2sSlaveDuplex (SdkWrapper &sdk)
157+ : I2sSlaveDuplex(sdk, 0 , 0 ) {} // // 0 is dummy. We don't care.
156158 MOCK_METHOD0 (GetStateMachine, uint32_t (void ));
157159 MOCK_METHOD0 (Start, void (void ));
158160 MOCK_METHOD0 (Stop, void (void ));
Original file line number Diff line number Diff line change 1+ /*
2+ * Test the MockI2sSlaveDuplex class.
3+ * Only constructor is tested.
4+ */
5+
6+ #include < gmock/gmock.h>
7+ #include < gtest/gtest.h>
8+
9+ #include " i2sslaveduplex.hpp"
10+ #include " sdkwrapper.hpp"
11+
12+ class MockI2sSlaveDuplexTest : public ::testing::Test {
13+ protected:
14+ virtual void SetUp () { i2s = new rpp_driver::MockI2sSlaveDuplex (sdk_); }
15+
16+ virtual void TearDown () { delete i2s; }
17+
18+ ::rpp_driver::MockSdkWrapper sdk_;
19+ ::rpp_driver::MockI2sSlaveDuplex *i2s;
20+ }; // MockI2sSlaveDuplexTest
21+
22+ /*
23+ * In this test case, we test teh MockI2sSlaveDuplex is surely able to
24+ * compile. So, none of the other methods are tested.
25+ */
26+ TEST_F (MockI2sSlaveDuplexTest, Constructor) {}
You can’t perform that action at this time.
0 commit comments