Skip to content

Commit 1c41fdd

Browse files
committed
Refine the comment.
Also adjust the position of GCOVR_EXCL_STOP tag.
1 parent 186ae14 commit 1c41fdd

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

src/codec/adau1361.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,23 @@ class Adau1361 {
159159
bool line_output_mute_;
160160
bool hp_output_mute_; // headphone
161161
};
162+
163+
#if __has_include(<gmock/gmock.h>)
164+
// GCOVR_EXCL_START
165+
class MockAdau1361 : public Adau1361 {
166+
public:
167+
MockAdau1361(Adau1361Lower& adau1361_lower)
168+
: Adau1361(48'000, 12'000'000, adau1361_lower) {
169+
} // with dummy fs and dummy mclock
170+
MOCK_METHOD0(GetStateMachine, uint32_t(void));
171+
MOCK_METHOD0(Start, void(void));
172+
MOCK_METHOD0(Stop, void(void));
173+
MOCK_METHOD1(PutFifoBlocking, void(int32_t value));
174+
MOCK_METHOD0(GetFifoBlocking, int32_t());
175+
};
176+
// GCOVR_EXCL_STOP
177+
#endif // __has_include(<gmock/gmock.h>)
178+
162179
} // namespace rpp_driver
163180

164181
#endif /* PICO_DRIVER_SRC_CODEC_ADAU1361_HPP_ */

src/i2s/i2sslaveduplex.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ class I2sSlaveDuplex {
154154
class MockI2sSlaveDuplex : public I2sSlaveDuplex {
155155
public:
156156
MockI2sSlaveDuplex(SdkWrapper &sdk)
157-
: I2sSlaveDuplex(sdk, 0, 0) {} // // 0 is dummy. We don't care.
157+
: I2sSlaveDuplex(sdk, 0, 0) {} // 0 is dummy. We don't care.
158158
MOCK_METHOD0(GetStateMachine, uint32_t(void));
159159
MOCK_METHOD0(Start, void(void));
160160
MOCK_METHOD0(Stop, void(void));
161161
MOCK_METHOD1(PutFifoBlocking, void(int32_t value));
162162
MOCK_METHOD0(GetFifoBlocking, int32_t());
163163
};
164-
#endif // __has_include(<gmock/gmock.h>)
165164
// GCOVR_EXCL_STOP
165+
#endif // __has_include(<gmock/gmock.h>)
166166
} // namespace rpp_driver
167167

168168
#endif // PICO_DRIVER_SRC_I2S_DUPLEXSLAVEI2S_HPP_

0 commit comments

Comments
 (0)