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:
Loic Coenen
2026-05-05 09:32:42 +00:00
parent 8e05c2f0ab
commit 5ebcac3aa4

View File

@@ -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 } };
// Empty -> Recording
*state = reducer(*state, action);
reducer(state, action);
assert(state->midi_clips[0].state == CLIP_RECORDING);
// Recording -> Looping
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].event_count == 20);
// Looping -> Stopped
*state = reducer(*state, action);
reducer(state, action);
assert(state->midi_clips[0].state == CLIP_STOPPED);
// Stopped -> Looping
*state = reducer(*state, action);
reducer(state, action);
assert(state->midi_clips[0].state == CLIP_LOOPING);
destroy_test_state(state);