-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move remaining mock methods in asserts.h/c into mock_comm module
- Loading branch information
1 parent
be7bd4a
commit 611c097
Showing
19 changed files
with
35 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
#include "genesis.h" | ||
#include <setjmp.h> | ||
#include <cmocka.h> | ||
#include "asserts.h" | ||
#include "wraps.h" | ||
|
||
#define INT_PTR(val) (&((int) { val })) | ||
|
||
#define UNUSED __attribute__((unused)) | ||
|
||
#define expect_value_with_pos(function, parameter, value, file, line) \ | ||
_expect_value(#function, #parameter, file, line, cast_to_largest_integral_type(value), 1) | ||
#define expect_any_with_pos(function, parameter, file, line) \ | ||
_expect_any(#function, #parameter, file, line, 1) | ||
#define will_return_with_pos(function, value, file, line) \ | ||
_will_return(#function, file, line, cast_to_largest_integral_type(value), 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
#include "genesis.h" | ||
#include "cmocka.h" | ||
|
||
void stub_megawifi_as_not_present(void); | ||
void stub_everdrive_as_present(void); | ||
void expect_usb_sent_byte(u8 value); | ||
void stub_usb_receive_nothing(void); | ||
void stub_usb_receive_byte(u8 value); | ||
void stub_usb_receive_program(u8 chan, u8 program); | ||
void stub_usb_receive_cc(u8 chan, u8 cc, u8 value); | ||
void stub_usb_receive_note_on(u8 chan, u8 key, u8 velocity); | ||
void stub_usb_receive_note_off(u8 chan, u8 key); | ||
void stub_usb_receive_pitch_bend(u8 chan, u16 bend); | ||
void stub_comm_read_returns_midi_event(u8 status, u8 data, u8 data2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#include "cmocka_inc.h" | ||
#include "asserts.h" | ||
#include "mocks/mock_synth.h" | ||
|
||
static bool disableChecks = false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#include "cmocka_inc.h" | ||
#include "asserts.h" | ||
#include "mocks/mock_ym2612.h" | ||
|
||
static bool disableChecks = false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters