소스 검색

Update input test

Ensure states are loaded and initialized to defaults.
master
부모
커밋
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.");
}



불러오는 중...
취소
저장