test: Phase 117 if-only nested-if call merge parity (VM + LLVM EXE)
Fixture & Smoke tests for nested if-only with call merge verification. **Fixture**: - apps/tests/phase117_if_only_nested_if_call_merge_min.hako - Pattern: nested if (inner: b == 1) inside outer if (a == 1), outer else - Call merge: f(1), f(2), f(3) results merged to single variable v - Expected output: 2, 3, 4 (f(x) = x + 1) **VM Smoke**: - tools/smokes/v2/profiles/integration/apps/phase117_if_only_nested_if_call_merge_vm.sh - Execution: NYASH_DISABLE_PLUGINS=1 HAKO_JOINIR_STRICT=1 - Validation: numeric output 3 lines "2\n3\n4" **LLVM EXE Smoke**: - tools/smokes/v2/profiles/integration/apps/phase117_if_only_nested_if_call_merge_llvm_exe.sh - Required plugins: FileBox, MapBox, StringBox, ConsoleBox, IntegerBox - Validation: numeric output "2\n3\n4" (3 lines) **Verification**: ✅ VM smoke: PASS ✅ LLVM EXE smoke: PASS ✅ Regression (Phase 116): PASS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
18
apps/tests/phase117_if_only_nested_if_call_merge_min.hako
Normal file
18
apps/tests/phase117_if_only_nested_if_call_merge_min.hako
Normal file
@ -0,0 +1,18 @@
|
||||
static box Main {
|
||||
f(x) { return x + 1 }
|
||||
g(a, b) {
|
||||
local v = 0
|
||||
if a == 1 {
|
||||
if b == 1 { v = f(1) } else { v = f(2) }
|
||||
} else {
|
||||
v = f(3)
|
||||
}
|
||||
print(v)
|
||||
}
|
||||
main() {
|
||||
g(1, 1) // → 2 (f(1) = 1+1)
|
||||
g(1, 0) // → 3 (f(2) = 2+1)
|
||||
g(0, 0) // → 4 (f(3) = 3+1)
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user