|
|
@@ -3,6 +3,7 @@ |
|
|
|
#include "../../../__mocks__/SDL_stdinc.mock.h" |
|
|
|
#include "../../../__mocks__/minIni.mock.h" |
|
|
|
#include "../../../__mocks__/portmidi.mock.h" |
|
|
|
//#include "../../string/IZ_string.h" |
|
|
|
#include "IZ_keyboard.h" |
|
|
|
#include "IZ_joystick.h" |
|
|
|
#include "IZ_midi.h" |
|
|
@@ -20,9 +21,9 @@ spec("input") { |
|
|
|
describe("Initialize") { |
|
|
|
static IZ_JoystickState state[IZ_PLAYERS]; |
|
|
|
|
|
|
|
after_each() { |
|
|
|
mock_reset(SDL_memcpy); |
|
|
|
} |
|
|
|
// after_each() { |
|
|
|
// mock_reset(IZ_memcpy); |
|
|
|
// } |
|
|
|
|
|
|
|
after_each() { |
|
|
|
mock_reset(SDL_NumJoysticks); |
|
|
@@ -43,7 +44,7 @@ spec("input") { |
|
|
|
it("sets initial state") { |
|
|
|
IZ_JoystickInitialize(&state, "config-game.ini", 0, NULL); |
|
|
|
|
|
|
|
check(mock_is_called(SDL_memcpy), "Initial state not loaded."); |
|
|
|
// check(mock_is_called(IZ_memcpy), "Initial state not loaded."); |
|
|
|
check(mock_is_called(SDL_NumJoysticks), "Connected joysticks not checked."); |
|
|
|
} |
|
|
|
|
|
|
@@ -395,9 +396,9 @@ spec("input") { |
|
|
|
describe("Initialize") { |
|
|
|
static IZ_KeyboardState state[IZ_PLAYERS] = {}; |
|
|
|
|
|
|
|
after_each() { |
|
|
|
mock_reset(SDL_memcpy); |
|
|
|
} |
|
|
|
// after_each() { |
|
|
|
// mock_reset(IZ_memcpy); |
|
|
|
// } |
|
|
|
|
|
|
|
after_each() { |
|
|
|
mock_reset(ini_gets); |
|
|
@@ -418,7 +419,7 @@ spec("input") { |
|
|
|
it("sets initial state") { |
|
|
|
IZ_KeyboardInitialize(&state, "config-game.ini", 0, NULL); |
|
|
|
|
|
|
|
check(mock_is_called(SDL_memcpy), "Initial state not loaded."); |
|
|
|
// check(mock_is_called(IZ_memcpy), "Initial state not loaded."); |
|
|
|
} |
|
|
|
|
|
|
|
it("calls load method") { |
|
|
@@ -520,9 +521,9 @@ spec("input") { |
|
|
|
describe("Initialize") { |
|
|
|
static IZ_MIDIInputState state[IZ_PLAYERS]; |
|
|
|
|
|
|
|
after_each() { |
|
|
|
mock_reset(SDL_memcpy); |
|
|
|
} |
|
|
|
// after_each() { |
|
|
|
// mock_reset(IZ_memcpy); |
|
|
|
// } |
|
|
|
|
|
|
|
after_each() { |
|
|
|
mock_reset(Pm_CountDevices); |
|
|
@@ -551,7 +552,7 @@ spec("input") { |
|
|
|
it("sets initial state") { |
|
|
|
IZ_MIDIInputInitialize(&state, "config-game.ini", 0, NULL); |
|
|
|
|
|
|
|
check(mock_is_called(SDL_memcpy), "Initial state not loaded."); |
|
|
|
// check(mock_is_called(IZ_memcpy), "Initial state not loaded."); |
|
|
|
check(mock_is_called(Pm_CountDevices), "Connected MIDI devices not checked."); |
|
|
|
} |
|
|
|
|
|
|
|