Переглянути джерело

Update input test

Ensure states are loaded and initialized to defaults.
master
TheoryOfNekomata 1 рік тому
джерело
коміт
c45ec22ff8
1 змінених файлів з 12 додано та 12 видалено
  1. +12
    -12
      src/packages/game/input/input.test.c

+ 12
- 12
src/packages/game/input/input.test.c Переглянути файл

@@ -24,9 +24,9 @@ spec("input") {
describe("Initialize") {
static IZ_JoystickState state[IZ_PLAYERS];

// after_each() {
// mock_reset(IZ_memcpy);
// }
after_each() {
mock_reset(IZ_memcpy);
}

after_each() {
mock_reset(SDL_NumJoysticks);
@@ -47,7 +47,7 @@ spec("input") {
it("sets initial state") {
IZ_JoystickInitialize(&state, IZ_CONFIG_GAME_PATH, 0, NULL);

// check(mock_is_called(IZ_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.");
}

@@ -378,9 +378,9 @@ spec("input") {
describe("Initialize") {
static IZ_KeyboardState state[IZ_PLAYERS] = {};

// after_each() {
// mock_reset(IZ_memcpy);
// }
after_each() {
mock_reset(IZ_memcpy);
}

after_each() {
mock_reset(IZ_ConfigInitialize);
@@ -401,7 +401,7 @@ spec("input") {
it("sets initial state") {
IZ_KeyboardInitialize(&state, IZ_CONFIG_GAME_PATH, 0, NULL);

// check(mock_is_called(IZ_memcpy), "Initial state not loaded.");
check(mock_is_called(IZ_memcpy), "Initial state not loaded.");
}

it("calls load method") {
@@ -482,9 +482,9 @@ spec("input") {
describe("Initialize") {
static IZ_MIDIInputState state[IZ_PLAYERS];

// after_each() {
// mock_reset(IZ_memcpy);
// }
after_each() {
mock_reset(IZ_memcpy);
}

after_each() {
mock_reset(Pm_CountDevices);
@@ -513,7 +513,7 @@ spec("input") {
it("sets initial state") {
IZ_MIDIInputInitialize(&state, IZ_CONFIG_GAME_PATH, 0, NULL);

// check(mock_is_called(IZ_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.");
}



Завантаження…
Відмінити
Зберегти