on master help sign in
first TransactionGraph test case working
455a020AgentM
TutorialDInterpreterTest.hs+1−3
@@ -14,7 +14,7 @@ main = do
14 counts <- runTestTT (TestList tests)
14 counts <- runTestTT (TestList tests)
15 if errors counts + failures counts > 0 then exitFailure else exitSuccess
15 if errors counts + failures counts > 0 then exitFailure else exitSuccess
16 where
16 where
17− tests = map (\(tutd, expected) -> TestCase $ assertTutdEqual basicDatabaseContext tutd expected) simpleRelTests ++ map (\(tutd, expected) -> TestCase $ assertTutdEqual dateExamples tutd expected) dateExampleRelTests
17+ tests = map (\(tutd, expected) -> TestCase $ assertTutdEqual basicDatabaseContext tutd expected) simpleRelTests ++ map (\(tutd, expected) -> TestCase $ assertTutdEqual dateExamples tutd expected) dateExampleRelTests ++ [transactionGraphTest1]
18 simpleRelTests = [("x:=true", Right relationTrue),
18 simpleRelTests = [("x:=true", Right relationTrue),
19 ("x:=false", Right relationFalse),
19 ("x:=false", Right relationFalse),
20 ("x:=true union false", Right relationTrue),
20 ("x:=true union false", Right relationTrue),
@@ -57,8 +57,6 @@ transactionGraphTest1 = TestCase $ do
57 (discon, graph) <- dateExamplesGraph
57 (discon, graph) <- dateExamplesGraph
58 assertEqual "validate bootstrapped graph" (validateGraph graph) Nothing
58 assertEqual "validate bootstrapped graph" (validateGraph graph) Nothing
59
59
60−
61−
62dateExamplesGraph :: IO (DisconnectedTransaction, TransactionGraph)
60dateExamplesGraph :: IO (DisconnectedTransaction, TransactionGraph)
63dateExamplesGraph = do
61dateExamplesGraph = do
64 firstTransactionUUID <- nextRandom
62 firstTransactionUUID <- nextRandom