Files
breeze/tests/session_results_flow_behavior.zi
waozi b5356aaac7 Port Inbe screens, storage, and platform hosts to Ziran
Replace the remaining .kry and C application sources with Ziran modules,
move vendored dependencies to their current pointers, and add Ziran tests for
the ported hosts and policies.
2026-09-27 15:40:52 -03:00

60 lines
1.7 KiB
Ziran

#import, file "../src/app/app_types.zi";
#import, file "../src/app/exercise_types.zi";
#import, file "../src/core/types.zi";
#import, file "../src/practices/session_results.zi";
using ExerciseType;
#program_export
Answer :: () -> s32 {
if app_text_from_cstring(null, 0) != "" {
return 99
}
app: InnerBreeze
fail_path: [5]u8 = .{102, 97, 105, 108, 0}
save_path: [5]u8 = .{115, 97, 118, 101, 0}
app.breathing.screen = ScreenResults
app_prepare_session_results(*app, EXERCISE_PATTERNS, 90, 2,
null, null, 0, *fail_path[0])
session_result_discard(*app)
if app.session_result.active != 1 ||
app.session_result.write_failed != 1 ||
app.breathing.screen != ScreenResults ||
app.ui.sync_requested {
return 1
}
app_prepare_session_results(*app, EXERCISE_PATTERNS, 90, 2,
null, null, 0, *save_path[0])
session_result_discard(*app)
if app.session_result.active != 0 ||
app.breathing.screen != ScreenStart ||
!app.ui.sync_requested {
return 2
}
app.ui.sync_requested = false
app.breathing.screen = ScreenResults
app_prepare_session_results(*app, EXERCISE_PATTERNS, 90, 2,
null, null, 0, *save_path[0])
app.session_result.mood = 9
session_result_done(*app)
if app.session_result.active != 1 ||
app.session_result.write_failed != 1 ||
app.breathing.screen != ScreenResults ||
app.ui.sync_requested {
return 3
}
app.session_result.mood = 4
session_result_done(*app)
if app.session_result.active != 0 ||
app.breathing.screen != ScreenStart ||
!app.ui.sync_requested {
return 4
}
return 42
}
#import, file "../src/app/host_services.zi";