diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-09 23:52:58 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-09 23:52:58 +0200 |
| commit | 8baa85fd4c3607a7b3cebf2518a930a3b8a924bf (patch) | |
| tree | 20b98351aca4edc8635e34b96d779bcecd9d8e19 /test/Spec.hs | |
| parent | 8ba98a86805c886719057f9df0d5a74c58c6dabd (diff) | |
Add atom data type
Diffstat (limited to 'test/Spec.hs')
| -rw-r--r-- | test/Spec.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Spec.hs b/test/Spec.hs index 4839ace..68e575c 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -126,7 +126,18 @@ e2eTests = testGroup "e2e" [ let expectedLastAST = astRecord "Result/Ex" $ M.fromList [("value", astString "failed to read file: does-not-exist.txt")] + assertEqual "" expectedLastAST (last gotASTs), + + do let env = builtinEnv + script1 <- readFile "test/scripts/atom1.milch" + (gotASTs, gotState) <- expectSuccessL env $ runInlineScript "<test>" script1 + + let expectedLastAST = astInteger 15 assertEqual "" expectedLastAST (last gotASTs) + + let expectedAtomMap = M.singleton (LAtomRef 1) (astInteger 15) + let gotAtomMap = stateAtomMap gotState + assertEqual "" expectedAtomMap gotAtomMap ] testGroup label xs = TestLabel label $ TestList $ map TestCase xs |
