@@ -36,14 +36,15 @@ main = do
3636 tcounts <- runTestTT (TestList tests)
3737 if errors tcounts + failures tcounts > 0 then exitFailure else exitSuccess
3838 where
39− tests = map (\(tutd, expected) -> TestCase $ assertTutdEqual basicDatabaseContext expected tutd) simpleRelTests ++ map (\(tutd, expected) -> TestCase $ assertTutdEqual dateExamples expected tutd) dateExampleRelTests ++ [
39+ tests = map (\(tutd, expected) -> TestCase $ assertTutdEqual basicDatabaseContext expected tutd) simpleRelTests ++
40+ map (\(tutd, expected) -> TestCase $ assertTutdEqual dateExamples expected tutd) dateExampleRelTests ++ [
4041 transactionGraphBasicTest,
4142 transactionGraphAddCommitTest,
4243 transactionRollbackTest,
4344 transactionJumpTest,
4445 transactionBranchTest,
4546 simpleJoinTest,
46− testNotification,
47+ testNotification,
4748 testTypeConstructors,
4849 testMergeTransactions,
4950 testComments,
@@ -63,7 +64,8 @@ main = do
6364 testAntijoin,
6465 testRelationAttributeDefinition,
6566 testAssignWithTypeVar,
66− testDefineWithTypeVar
67+ testDefineWithTypeVar,
68+ testIntervalType
6769 ]
6870 simpleRelTests = [("x:=true", Right relationTrue),
6971 ("x:=false", Right relationFalse),
@@ -568,3 +570,12 @@ testDefineWithTypeVar = TestCase $ do
568570 (sessionId, dbconn) <- dateExamplesConnection emptyNotificationCallback
569571 let err1 = "TypeConstructorTypeVarMissing"
570572 expectTutorialDErr sessionId dbconn (T.isInfixOf err1) "y::{a int, b invalidtype}"
573+
574+testIntervalType :: Test
575+testIntervalType = TestCase $ do
576+ (sessionId, dbconn) <- dateExamplesConnection emptyNotificationCallback
577+ executeTutorialD sessionId dbconn "x:=relation{a Interval Integer}"
578+ eX <- executeRelationalExpr sessionId dbconn (RelationVariable "x" ())
579+ let expectedIntervalInt = mkRelationFromList expectedAttrs []
580+ expectedAttrs = A.attributesFromList [Attribute "a" (ConstructedAtomType "Interval" (M.singleton "a" IntegerAtomType))]
581+ assertEqual "Interval Int attribute" expectedIntervalInt eX