on master help sign in
add Tutorial D insert test
7f32362AgentM
TutorialDInterpreterTest.hs+2−1
@@ -29,7 +29,8 @@ main = do
29 ("x:=true where true and false", Right relationFalse),
29 ("x:=true where true and false", Right relationFalse),
30 ("x:=true where true and true", Right relationTrue),
30 ("x:=true where true and true", Right relationTrue),
31 ("x:=true=true", Right relationTrue),
31 ("x:=true=true", Right relationTrue),
32− ("x:=true=false", Right relationFalse)
32+ ("x:=true=false", Right relationFalse),
33+ ("x:=relation {b int, a char}; insert x relation{tuple{b int(5), a char(\"spam\")}}", mkRelation simpleCAttributes (HS.fromList [RelationTuple $ M.fromList [("a", StringAtom "spam"), ("b", IntAtom 5)]]))
33 ]
34 ]
34 simpleAAttributes = M.fromList [("a", Attribute "a" IntAtomType)]
35 simpleAAttributes = M.fromList [("a", Attribute "a" IntAtomType)]
35 simpleBAttributes = M.fromList [("d", Attribute "d" IntAtomType)]
36 simpleBAttributes = M.fromList [("d", Attribute "d" IntAtomType)]