Skip to content

Commit

Permalink
bounds + unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nitinprakash96 committed Jul 15, 2024
1 parent e4c098e commit 7aed139
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion swarm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ library swarm-lang
terminal-size >=0.3 && <1.0,
text,
text-rope >=0.2 && <0.3,
unicode-show,
unicode-show >=0.1 && <0.2,
vector,
vty,
witch,
Expand Down
4 changes: 4 additions & 0 deletions test/unit/TestEval.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ testEval g =
, testCase
"format function"
("format (\\x. x + 1)" `evaluatesTo` VText "\\x. x + 1")
, testCase
"format forall"
("format \"\"" `evaluatesTo` VText "\"\"")
, testCase
"concat"
("\"x = \" ++ format (2+3) ++ \"!\"" `evaluatesTo` VText "x = 5!")
Expand Down Expand Up @@ -346,6 +349,7 @@ testEval g =
where
tquote :: String -> Text
tquote = T.pack . show

throwsError :: Text -> (Text -> Bool) -> Assertion
throwsError tm p = do
result <- evaluate tm
Expand Down

0 comments on commit 7aed139

Please sign in to comment.