Skip to content

Commit 429c954

Browse files
committed
Merge branch 'feature/13' into develop
2 parents ee133ae + 59a54c1 commit 429c954

9 files changed

Lines changed: 16 additions & 13 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ History of the project development
55
The issue #16 changes its public member function. But it is referred internally from ::rpp_driver::Adau1361 class. Not called by user program. Then, the major version number is not needed to change.
66

77
### Added
8+
- [Issue #13](https://github.com/suikan4github/rpp_driver/issues/13) Exclude Mock definition from the GCov coverage.
89
### Changed
910
- [Issue #10](https://github.com/suikan4github/rpp_driver/issues/10) Cover APIs of the Raspberry Pi Pico SDK.
1011
- [Issue #16](https://github.com/suikan4github/rpp_driver/issues/16) Change the member function name from ConfigureSRC() to ConfigureSrc().

src/codec/adau1361lower.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class Adau1361Lower {
231231

232232
// #ifdef MOCK_METHOD0
233233
#if __has_include(<gmock/gmock.h>)
234-
234+
// GCOVR_EXCL_START
235235
class MockAdau1361Lower : public Adau1361Lower {
236236
public:
237237
explicit MockAdau1361Lower(::rpp_driver::I2cMasterInterface& controller)
@@ -257,7 +257,7 @@ class MockAdau1361Lower : public Adau1361Lower {
257257
void(float left_gain, float right_gain, bool mute));
258258
};
259259
#endif // __has_include(<gmock/gmock.h>)
260-
260+
// GCOVR_EXCL_STOP
261261
} // namespace rpp_driver
262262

263263
#endif /* PICO_DRIVER_SRC_CODEC_ADAU1361LOWER_HPP_ */

src/gpio/gpiobasic.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class GpioBasic {
100100
const uint pin_;
101101
};
102102
#if __has_include(<gmock/gmock.h>)
103-
103+
// GCOVR_EXCL_START
104104
class MockGpioBasic : public SdkWrapper {
105105
public:
106106
MOCK_METHOD1(SetDir, void(bool));
@@ -112,7 +112,7 @@ class MockGpioBasic : public SdkWrapper {
112112
MOCK_METHOD0(PullDown, void(void));
113113
MOCK_METHOD0(DisablePulls, void(void));
114114
}; // MockGpioBasic
115-
115+
// GCOVR_EXCL_STOP
116116
#endif // __has_include(<gmock/gmock.h>)
117117
}; // namespace rpp_driver
118118

src/i2c/i2cmasterinterface.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class I2cMasterInterface {
6868
};
6969

7070
#if __has_include(<gmock/gmock.h>)
71-
71+
// GCOVR_EXCL_START
7272
class MockI2cMasterInterface : public I2cMasterInterface {
7373
public:
7474
MOCK_METHOD4(ReadBlocking,
@@ -77,7 +77,7 @@ class MockI2cMasterInterface : public I2cMasterInterface {
7777
int(uint8_t addr, const uint8_t *src, size_t len, bool nostop));
7878
MOCK_METHOD1(IsDeviceExisting, bool(uint8_t addr));
7979
};
80-
80+
// GCOVR_EXCL_STOP
8181
#endif // __has_include(<gmock/gmock.h>)
8282
} // namespace rpp_driver
8383

src/i2s/i2sslaveduplex.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class I2sSlaveDuplex {
150150
};
151151

152152
#if __has_include(<gmock/gmock.h>)
153-
153+
// GCOVR_EXCL_START
154154
class MockI2sSlaveDuplex : public I2sSlaveDuplex {
155155
public:
156156
MOCK_METHOD0(GetStateMachine, uint32_t(void));
@@ -160,7 +160,7 @@ class MockI2sSlaveDuplex : public I2sSlaveDuplex {
160160
MOCK_METHOD0(GetFifoBlocking, int32_t());
161161
};
162162
#endif // __has_include(<gmock/gmock.h>)
163-
163+
// GCOVR_EXCL_STOP
164164
} // namespace rpp_driver
165165

166166
#endif // PICO_DRIVER_SRC_I2S_DUPLEXSLAVEI2S_HPP_

src/sdk/mocksdkwrapper.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
#if __has_include(<gmock/gmock.h>)
7-
7+
// GCOVR_EXCL_START
88
class MockSdkWrapper : public SdkWrapper {
99
public:
1010
MOCK_METHOD1(i2c_deinit, void(i2c_inst_t* i2c));
@@ -427,4 +427,5 @@ class MockSdkWrapper : public SdkWrapper {
427427
void(stdio_driver_t* driver, bool translate));
428428
} // class MockSdkWrapper : public SdkWrapper
429429
;
430+
// GCOVR_EXCL_STOP
430431
#endif // __has_include(<gmock/gmock.h>)

src/sdk/pico_sdk_headers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*
77
* Not intended to be read from the application program.
88
*/
9-
#include <../../hardware_clocks/include/hardware/clocks.h>
10-
#include <../../hardware_gpio/include/hardware/gpio.h>
119
#include <../../hardware_i2c/include/hardware/i2c.h>
1210
#include <../../hardware_pio/include/hardware/pio.h>
13-
#include <../../pico_stdio/include/pico/stdio.h>
11+
#include <../../hardware_gpio/include/hardware/gpio.h>
12+
#include <../../hardware_clocks/include/hardware/clocks.h>
1413
#include <../../pico_time/include/pico/time.h>
14+
#include <../../pico_stdio/include/pico/stdio.h>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
} // class MockSdkWrapper : public SdkWrapper
22
;
3+
// GCOVR_EXCL_STOP
34
#endif // __has_include(<gmock/gmock.h>)

src/sdk/scripts/blocks/mocksdkwrapper_preumble.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
*/
55

66
#if __has_include(<gmock/gmock.h>)
7-
7+
// GCOVR_EXCL_START
88
class MockSdkWrapper : public SdkWrapper {
99
public:

0 commit comments

Comments
 (0)