aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-10-05 14:48:14 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2022-12-05 14:21:53 +0200
commit694021a9bd1dd0420a8594ea24218c47fbbab51e (patch)
treecd59da1ef660dda410050b2ee467b16fdd8f60ca /test
parent7a6dd411a5d8e515fa5fa3d32650565c2e8a5f1b (diff)
Refactor Depth into LContext
Diffstat (limited to 'test')
-rw-r--r--test/Spec.hs2
-rw-r--r--test/TestUtils.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/Spec.hs b/test/Spec.hs
index 710e528..e67f2b7 100644
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -29,7 +29,7 @@ parseTests = testGroup "parse" [
evaluateTests = testGroup "evaluate" [
do let env = M.fromList [builtinAdd2] :: Env
(gotAST, LState { stateEnv = gotEnv }) <- expectSuccessL env $
- evaluate 0 (astFunctionCall [astSymbol "+", astInteger 1, astInteger 2])
+ evaluate (astFunctionCall [astSymbol "+", astInteger 1, astInteger 2])
let expectedAST = astInteger 3
assertEqual "" gotAST expectedAST
diff --git a/test/TestUtils.hs b/test/TestUtils.hs
index e505de2..84f95bf 100644
--- a/test/TestUtils.hs
+++ b/test/TestUtils.hs
@@ -14,7 +14,7 @@ testConfig = Config {
}
testRunL :: Env -> LContext a -> IO (Either LException (a, LState))
-testRunL env = runL LState { stateConfig = testConfig, stateEnv = env }
+testRunL env = runL LState { stateConfig = testConfig, stateEnv = env, stateDepth = 0 }
expectSuccessL :: Env -> LContext a -> IO (a, LState)
expectSuccessL env lc =