1import TutorialDInterpreter
6import qualified Data.HashSet as HS
7import qualified Data.Map as M
11 counts <- runTestTT (TestList tests)
12 if errors counts + failures counts > 0 then exitFailure else exitSuccess
14 tests = map (\(tutd, expected) -> TestCase $ assertTutdEqual basicRelVarContext tutd expected) simpleRelTests
15 simpleRelTests = [("true", Right relationTrue),
16 ("false", Right relationFalse),
17 ("true union false", Right relationTrue),
18 ("true; false", Right relationFalse),
19 ("a:=relation{a int}", mkRelation simpleAAttributes HS.empty),
20 ("b:=relation{c int} rename {c as d}", mkRelation simpleBAttributes HS.empty),
21 ("a:=relation{b int, c int}; a{c}", mkRelation simpleProjectionAttributes HS.empty)
23 simpleAAttributes = M.fromList [("a", Attribute "a" IntAtomType)]
24 simpleBAttributes = M.fromList [("d", Attribute "d" IntAtomType)]
25 simpleProjectionAttributes = M.fromList [("c", Attribute "c" IntAtomType)]
28testSimple1 = TestCase $ assertTutdEqual basicRelVarContext "true" (Right relationTrue)
30assertTutdEqual relVarContext tutd expected = assertEqual tutd interpreted expected
32 interpreted = fst (interpret relVarContext tutd)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list