refactor: update reducer calls to use pointer argument in test
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
@@ -810,21 +810,21 @@ void test_midi_clip_full_cycle(void) {
|
|||||||
Action action = { .type = ACTION_MIDI_CLIP_TRIGGER, .data.midi_clip_trigger = { .clip_index = 0 } };
|
Action action = { .type = ACTION_MIDI_CLIP_TRIGGER, .data.midi_clip_trigger = { .clip_index = 0 } };
|
||||||
|
|
||||||
// Empty -> Recording
|
// Empty -> Recording
|
||||||
*state = reducer(*state, action);
|
reducer(state, action);
|
||||||
assert(state->midi_clips[0].state == CLIP_RECORDING);
|
assert(state->midi_clips[0].state == CLIP_RECORDING);
|
||||||
|
|
||||||
// Recording -> Looping
|
// Recording -> Looping
|
||||||
state->midi_clips[0].event_count = 20;
|
state->midi_clips[0].event_count = 20;
|
||||||
*state = reducer(*state, action);
|
reducer(state, action);
|
||||||
assert(state->midi_clips[0].state == CLIP_LOOPING);
|
assert(state->midi_clips[0].state == CLIP_LOOPING);
|
||||||
assert(state->midi_clips[0].event_count == 20);
|
assert(state->midi_clips[0].event_count == 20);
|
||||||
|
|
||||||
// Looping -> Stopped
|
// Looping -> Stopped
|
||||||
*state = reducer(*state, action);
|
reducer(state, action);
|
||||||
assert(state->midi_clips[0].state == CLIP_STOPPED);
|
assert(state->midi_clips[0].state == CLIP_STOPPED);
|
||||||
|
|
||||||
// Stopped -> Looping
|
// Stopped -> Looping
|
||||||
*state = reducer(*state, action);
|
reducer(state, action);
|
||||||
assert(state->midi_clips[0].state == CLIP_LOOPING);
|
assert(state->midi_clips[0].state == CLIP_LOOPING);
|
||||||
|
|
||||||
destroy_test_state(state);
|
destroy_test_state(state);
|
||||||
|
|||||||
Reference in New Issue
Block a user