@@ -54,7 +54,8 @@ main = do
5454 testFunctionalDependencies,
5555 testEmptyCommits,
5656 testIntervalAtom,
57− testListConstructedAtom
57+ testListConstructedAtom,
58+ testTypeChecker
5859 ]
5960 simpleRelTests = [("x:=true", Right relationTrue),
6061 ("x:=false", Right relationFalse),
@@ -478,4 +479,11 @@ testListConstructedAtom = TestCase $ do
478479 let err1 = "ConstructedAtomArgumentCountMismatchError 2 1"
479480 expectTutorialDErr sessionId dbconn (T.isPrefixOf err1) "z:=relation{tuple{l Cons 4}}"
480481 let err2 = "TypeConstructorAtomTypeMismatch \"List\" IntegerAtomType"
481− expectTutorialDErr sessionId dbconn (T.isPrefixOf err2) "z:=relation{tuple{l Cons 4 5}}"
482+ expectTutorialDErr sessionId dbconn (T.isPrefixOf err2) "z:=relation{tuple{l Cons 4 5}}"
483+
484+testTypeChecker :: Test
485+testTypeChecker = TestCase $ do
486+ (sessionId, dbconn) <- dateExamplesConnection emptyNotificationCallback
487+ let err1 = "AtomFunctionTypeError \"max\" 1 (RelationAtomType [Attribute \"_\" IntegerAtomType]) IntegerAtomType"
488+ expectTutorialDErr sessionId dbconn (T.isPrefixOf err1) "x:=relation{tuple{a 0}}:{b:=max(@a)}"
489+