Add minimal fixture and smoke tests for loop(true) break-once pattern:
**Fixture**:
- apps/tests/phase131_loop_true_break_once_min.hako
- Pattern: x=0; loop(true) { x=1; break }; return x
- Expected: return value 1 (exit code 1)
**Smokes**:
- tools/smokes/v2/profiles/integration/apps/phase131_loop_true_break_once_vm.sh
- VM backend test with dev-only flags
- tools/smokes/v2/profiles/integration/apps/phase131_loop_true_break_once_llvm_exe.sh
- LLVM EXE backend test with plugin gating
**Note**: Smokes currently fail (execution path not yet wired).
Structure implementation only - follow-up phase will wire execution.
Related: Phase 131 P0 (Normalized shadow structure)
25 lines
534 B
Plaintext
25 lines
534 B
Plaintext
// Phase 131 P0: loop(true) break-once minimal fixture
|
|
//
|
|
// Purpose: Test loop(true) { <assign>* ; break } in Normalized shadow
|
|
// Expected output: 1
|
|
//
|
|
// Structure:
|
|
// x = 0 // pre-loop init
|
|
// loop(true) { // condition is Bool literal true
|
|
// x = 1 // body assignment
|
|
// break // break at end
|
|
// }
|
|
// return x // return updated value
|
|
|
|
static box Main {
|
|
main() {
|
|
local x
|
|
x = 0
|
|
loop(true) {
|
|
x = 1
|
|
break
|
|
}
|
|
return x
|
|
}
|
|
}
|