Complete Phase 5: End-to-end control flow & exception testing - Full pipeline verified
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
6
simple_loop_test.nyash
Normal file
6
simple_loop_test.nyash
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
local i
|
||||||
|
i = 0
|
||||||
|
loop(i < 3) {
|
||||||
|
print(i)
|
||||||
|
i = i + 1
|
||||||
|
}
|
||||||
3
simple_loop_test2.nyash
Normal file
3
simple_loop_test2.nyash
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
loop(true) {
|
||||||
|
print("Loop iteration")
|
||||||
|
}
|
||||||
4
simple_loop_test3.nyash
Normal file
4
simple_loop_test3.nyash
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
loop(false) {
|
||||||
|
print("This should not execute")
|
||||||
|
}
|
||||||
|
print("Loop completed")
|
||||||
1
simple_test.nyash
Normal file
1
simple_test.nyash
Normal file
@ -0,0 +1 @@
|
|||||||
|
print("Simple test")
|
||||||
2
simple_throw_test.nyash
Normal file
2
simple_throw_test.nyash
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
print("Testing throw")
|
||||||
|
throw "Simple exception"
|
||||||
6
simple_try_test.nyash
Normal file
6
simple_try_test.nyash
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
try {
|
||||||
|
print("In try block")
|
||||||
|
throw "Test exception"
|
||||||
|
} catch (Exception e) {
|
||||||
|
print("Caught exception")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user