llvm: extend If PHI hygiene smoke with multi-branch + guard chain case
This commit is contained in:
11
apps/tests/macro_golden_if_chain_guard.nyash
Normal file
11
apps/tests/macro_golden_if_chain_guard.nyash
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
local x = 5
|
||||||
|
if (x < 0) {
|
||||||
|
print(-1)
|
||||||
|
} else if (x < 3) {
|
||||||
|
print(0)
|
||||||
|
} else if ((x < 10) && x.is("Integer")) {
|
||||||
|
print(1)
|
||||||
|
} else {
|
||||||
|
print(2)
|
||||||
|
}
|
||||||
|
|
||||||
@ -44,6 +44,7 @@ check_case "apps/tests/macro_golden_if_assign.nyash"
|
|||||||
check_case "apps/tests/macro_golden_if_print.nyash"
|
check_case "apps/tests/macro_golden_if_print.nyash"
|
||||||
check_case "apps/tests/macro_golden_if_return.nyash"
|
check_case "apps/tests/macro_golden_if_return.nyash"
|
||||||
check_case "apps/tests/macro_golden_type_is_basic.nyash"
|
check_case "apps/tests/macro_golden_type_is_basic.nyash"
|
||||||
|
check_case "apps/tests/macro_golden_if_chain_guard.nyash"
|
||||||
|
|
||||||
if [ "$fails" -ne 0 ]; then
|
if [ "$fails" -ne 0 ]; then
|
||||||
exit 2
|
exit 2
|
||||||
|
|||||||
Reference in New Issue
Block a user