Skip to content

Commit

Permalink
Merge pull request #947 from GaloisInc/fix-dumptests
Browse files Browse the repository at this point in the history
Fix bug in `dumpableType` function. Fixes #946.
  • Loading branch information
brianhuffman authored Nov 13, 2020
2 parents d00ff6b + fdd7aab commit 7491038
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ cryptol-2.*
# ignore test suite output
/bin
/output
/tests/regression/*.out
2 changes: 1 addition & 1 deletion src/Cryptol/Testing/Random.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ dumpableType ty =
case tIsFun ty of
Just (t1, t2) ->
do g <- randomValue Concrete t1
as <- testableTypeGenerators t2
as <- dumpableType t2
return (g : as)
Nothing ->
do (_ :: Gen g Concrete) <- randomValue Concrete ty
Expand Down
2 changes: 2 additions & 0 deletions tests/regression/dumptests.cry
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add32 : [32] -> [32] -> [32]
add32 x y = x + y
3 changes: 3 additions & 0 deletions tests/regression/dumptests.icry
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:set tests=100
:l dumptests.cry
:dumptests add32.out add32
3 changes: 3 additions & 0 deletions tests/regression/dumptests.icry.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Loading module Cryptol
Loading module Cryptol
Loading module Main

0 comments on commit 7491038

Please sign in to comment.