File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99#include " gpiobasic.hpp"
1010#include " sdkwrapper.hpp"
1111
12+ using ::testing::_;
1213class MockGpioBasicTest : public ::testing::Test {
1314 protected:
14- virtual void SetUp () { gpio = new rpp_driver::MockGpioBasic (sdk_); }
15+ virtual void SetUp () {
16+ EXPECT_CALL (sdk_, gpio_init (_));
17+ gpio = new rpp_driver::MockGpioBasic (sdk_);
18+ }
1519
16- virtual void TearDown () { delete gpio; }
20+ virtual void TearDown () {
21+ EXPECT_CALL (sdk_, gpio_deinit (_));
22+ delete gpio;
23+ }
1724
1825 ::rpp_driver::MockSdkWrapper sdk_;
1926 ::rpp_driver::MockGpioBasic *gpio;
@@ -23,4 +30,4 @@ class MockGpioBasicTest : public ::testing::Test {
2330 * In this test case, we test teh MockGpioBasic is surely able to compile.
2431 * So, none of the other methods are tested.
2532 */
26- TEST_F (MockGpioBasicTest, constructor ) {}
33+ TEST_F (MockGpioBasicTest, Constructor ) {}
You can’t perform that action at this time.
0 commit comments