summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs')
-rw-r--r--lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs b/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs
index 0c2be66..7f77eeb 100644
--- a/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs
+++ b/lambda-calcul/haskell/test/Minilang/REPL/NetSpec.hs
@@ -68,17 +68,20 @@ spec :: Spec
spec = around withServer $
describe "MiniLang Network REPL" $ do
it "evaluates expression and returns evaluation result" $ \Server {serverPort} -> do
- let inp = [In "((lam (x) x) y)"]
- expectedOutput = [Right $ Evaluated (AST.Sym "y") (Var "y") (TyVar "b")]
+ let inp = [Com (Set (SelectLanguage Typed)), In "((lam (x) x) y)"]
+ expectedOutput =
+ [ Right (Msg "Language set to Typed"),
+ Right $ Evaluated (AST.Sym "y") (Var "y") (TyVar "b")
+ ]
res <- runTestClient serverPort ".newenv1" inp
res `shouldBe` expectedOutput
it "allows retrieving empty initial env" $ \Server {serverPort} -> do
- let inp = [Com (Set (SelectLanguage Untyped)), Com DumpEnv]
+ let inp = [Com (Set (SelectLanguage Typed)), Com DumpEnv]
expectedOutput =
- [ Right (Msg "Language set to Untyped"),
- Right $ CurrentEnv newEnv newContext Untyped
+ [ Right (Msg "Language set to Typed"),
+ Right $ CurrentEnv newEnv newContext Typed
]
res <- runTestClient serverPort ".newenv2" inp