diff --git a/test_tui.c b/test_tui.c index 236e644..48bd305 100644 --- a/test_tui.c +++ b/test_tui.c @@ -1458,88 +1458,8 @@ void test_undo_reset_clip(void) { destroy_test_state(&state); } -// Test 61: Undo/redo with quantize mode change -void test_undo_quantize_change(void) { - printf("Test 61: Undo quantize mode change... "); - AppState state = create_test_state(); - - assert(state.quantize_mode == QUANTIZE_OFF); - - // Change quantize mode - Action action = { .type = ACTION_SET_QUANTIZE_MODE, .data.set_quantize_mode.mode = QUANTIZE_BEAT }; - state = reducer(state, action); - assert(state.quantize_mode == QUANTIZE_BEAT); - - // Undo: should go back to OFF - action.type = ACTION_UNDO; - state = reducer(state, action); - assert(state.quantize_mode == QUANTIZE_OFF); - - // Redo: should go back to BEAT - action.type = ACTION_REDO; - state = reducer(state, action); - assert(state.quantize_mode == QUANTIZE_BEAT); - - printf("PASSED\n"); - destroy_test_state(&state); -} -// Test 62: Undo/redo with threshold change -void test_undo_threshold_change(void) { - printf("Test 62: Undo threshold change... "); - AppState state = create_test_state(); - - assert(state.quantize_threshold == 0); - - // Change threshold - Action action = { .type = ACTION_SET_QUANTIZE_THRESHOLD, .data.set_quantize_threshold.threshold = 1000 }; - state = reducer(state, action); - assert(state.quantize_threshold == 1000); - - // Undo: should go back to 0 - action.type = ACTION_UNDO; - state = reducer(state, action); - assert(state.quantize_threshold == 0); - - // Redo: should go back to 1000 - action.type = ACTION_REDO; - state = reducer(state, action); - assert(state.quantize_threshold == 1000); - - printf("PASSED\n"); - destroy_test_state(&state); -} -// Test 63: Undo/redo with transport reset -void test_undo_transport_reset(void) { - printf("Test 63: Undo transport reset... "); - AppState state = create_test_state(); - - // Set up transport state - state.transport_state = TRANSPORT_PLAYING; - state.clock_count = 100; - state.beat_position = 2; - state.bar_position = 5; - state.sample_position = 10000; - - // Reset transport - Action action = { .type = ACTION_TRANSPORT_STOP }; - state = reducer(state, action); - assert(state.transport_state == TRANSPORT_STOPPED); - assert(state.clock_count == 0); - - // Undo: should restore transport state - action.type = ACTION_UNDO; - state = reducer(state, action); - assert(state.transport_state == TRANSPORT_PLAYING); - assert(state.clock_count == 100); - assert(state.beat_position == 2); - assert(state.bar_position == 5); - assert(state.sample_position == 10000); - - printf("PASSED\n"); - destroy_test_state(&state); -} // Test 64: Undo/redo with paste operation void test_undo_paste(void) {