Skip to content

Commit

Permalink
Add test for UpEnv/DownEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 20, 2017
1 parent 71df3bb commit d5d8c5b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tst/test-error/up-down-env.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
f:=lvl -> 1/lvl + f(lvl-1);
f(7);
UpEnv(1); lvl;
DownEnv(1); lvl;
DownEnv(1); lvl;
UpEnv(1); lvl;
DownEnv(10); lvl;
UpEnv(1); lvl;
UpEnv(3); lvl;
DownEnv(2); lvl;
19 changes: 19 additions & 0 deletions tst/test-error/up-down-env.g.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
function( lvl ) ... end
Error, Rational operations: <divisor> must not be zero in
return 1 / lvl + f( (lvl - 1) ); at *stdin*:1 called from
f( lvl - 1 ) at *stdin*:1 called from
f( lvl - 1 ) at *stdin*:1 called from
f( lvl - 1 ) at *stdin*:1 called from
f( lvl - 1 ) at *stdin*:1 called from
f( lvl - 1 ) at *stdin*:1 called from
... at *stdin*:2
you can replace <divisor> via 'return <divisor>;'
brk> 0
brk> 1
brk> 2
brk> 1
brk> 7
brk> 6
brk> 3
brk> 5
brk>

0 comments on commit d5d8c5b

Please sign in to comment.