Skip to content

Commit

Permalink
Update the test for issue 211 to restore the old test behavior.
Browse files Browse the repository at this point in the history
Also, test for looping computations in addition to `error` computations.
This doesn't let us cheat by eta-expanding the error, as we were
doing before.
  • Loading branch information
robdockins committed Apr 13, 2021
1 parent 838a252 commit 31ab387
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/issues/issue211.icry
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
take`{1} (join [0x1, 0x2, repeat (error "boom"), 0x4])
take`{1} (join [0x1, 0x2, error "boom", 0x4])
take`{1} (join [0x1, 0x2, x where x = x, 0x4])
take`{1} [True, False, error "boom", True]
take`{1} [True, False, x where x = x, True]
(splitAt`{0} [True, False, error "boom", True]).0
(splitAt`{0} [True, False, x where x = x, True]).0
(splitAt`{0} [True, False, error "boom", True]).1
(splitAt`{0} [True, False, x where x = x, True]).1
15 changes: 13 additions & 2 deletions tests/issues/issue211.icry.stdout
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
Loading module Cryptol
0x0
0x0
0x1
0x1
0x0
0x0

Run-time error: boom
-- Backtrace --
Cryptol::error called at issue211.icry:4:28--4:33
Cryptol::splitAt called at issue211.icry:4:2--4:9
Cryptol::error called at issue211.icry:7:28--7:33
Cryptol::splitAt called at issue211.icry:7:2--7:9

<<loop>> while evaluating <interactive>::x
This usually occurs due to an improper recursive definition,
but may also result from retrying a previously interrupted
computation (e.g., after CTRL^C). In that case, you may need to
`:reload` the current module to reset to a good state.
-- Backtrace --
Cryptol::splitAt called at issue211.icry:8:2--8:9

0 comments on commit 31ab387

Please sign in to comment.