diff --git a/tests/asserts.c b/tests/asserts.c index b2d4ed0..6c6b992 100644 --- a/tests/asserts.c +++ b/tests/asserts.c @@ -87,11 +87,13 @@ void expect_synth_pitch_any(void) expect_any(__wrap_synth_pitch, freqNumber); } -void expect_synth_pitch(u8 channel, u8 octave, u16 freqNumber) +void _expect_synth_pitch(u8 channel, u8 octave, u16 freqNumber, + const char* const file, const int line) { - expect_value(__wrap_synth_pitch, channel, channel); - expect_value(__wrap_synth_pitch, octave, octave); - expect_value(__wrap_synth_pitch, freqNumber, freqNumber); + expect_value_with_pos(__wrap_synth_pitch, channel, channel, file, line); + expect_value_with_pos(__wrap_synth_pitch, octave, octave, file, line); + expect_value_with_pos( + __wrap_synth_pitch, freqNumber, freqNumber, file, line); } void expect_synth_volume(u8 channel, u8 volume) diff --git a/tests/asserts.h b/tests/asserts.h index a1af0d1..fe5c2b3 100644 --- a/tests/asserts.h +++ b/tests/asserts.h @@ -19,6 +19,8 @@ void expect_synth_volume_any(void); void expect_synth_volume(u8 channel, u8 volume); u8 regOpIndex(u8 op); +void _expect_synth_pitch(u8 channel, u8 octave, u16 freqNumber, + const char* const file, const int line); void _expect_ym2612_write_reg( u8 part, u8 reg, u8 data, const char* const file, const int line); void _expect_ym2612_write_channel( @@ -87,6 +89,9 @@ void _expect_ym2612_write_operator(u8 chan, u8 op, u8 baseReg, u8 data, expect_value(__wrap_comm_megawifi_midiEmitCallback, midiByte, mb2); \ } +#define expect_synth_pitch(channel, octave, freqNumber) \ + _expect_synth_pitch(channel, octave, freqNumber, __FILE__, __LINE__) + #define expect_ym2612_write_operator(chan, op, baseReg, data) \ _expect_ym2612_write_operator(chan, op, baseReg, data, __FILE__, __LINE__)