Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tests with nop and try objects #79

Merged
merged 14 commits into from
Nov 28, 2022
2 changes: 2 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ jobs:
- run: cp -r target/eo-after/. gh-pages
- uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages
folder: gh-pages
19 changes: 19 additions & 0 deletions src/test/eo/org/eolang/dejump/catch_error_in_goto.eo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[] > catch_error_in_goto
try > @
[]
goto > @
[g]
if. > @
TRUE
g.forward
div.
42
0
"never happened"
[e]
seq > @
QQ.io.stdout e
eq.
e
"The 1th argument of 'int.div' is invalid: division by zero is infinity"
nop
7 changes: 7 additions & 0 deletions src/test/eo/org/eolang/dejump/goto_inside_nop.eo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[] > goto_inside_nop
nop > @
goto
[g]
seq > @
QQ.io.stdout "Never happened\n"
g.forward TRUE
12 changes: 12 additions & 0 deletions src/test/eo/org/eolang/dejump/goto_inside_try.eo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[] > goto_inside_try
try > @
[]
goto > @
[g]
if. > @
TRUE
g.forward TRUE
"never happened"
[e]
e > @
nop