瀏覽代碼

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.");
}



Loading…
取消
儲存