@@ -24,9 +24,9 @@ main = do
25testList :: Test
25testList :: Test
26testList = TestList [
26testList = TestList [
27− testSubGraphToFirstAncestorBasic
27+ testSubGraphToFirstAncestorBasic,
28− --testSubGraphToFirstAncestorSnipBranch,
28+ testSubGraphToFirstAncestorSnipBranch,
29− --testSelectedBranchMerge
29+ testSelectedBranchMerge
32-- | Create a transaction graph with two branches and no changes between them.
32-- | Create a transaction graph with two branches and no changes between them.
@@ -79,7 +79,6 @@ assertMaybe x msg = case x of
79testSubGraphToFirstAncestorBasic :: Test
79testSubGraphToFirstAncestorBasic :: Test
80testSubGraphToFirstAncestorBasic = TestCase $ do
80testSubGraphToFirstAncestorBasic = TestCase $ do
81 graph <- basicTransactionGraph
81 graph <- basicTransactionGraph
82− putStrLn $ showGraphStructure graph
83 assertGraph graph
82 assertGraph graph
84 transA <- assertMaybe (transactionForHead "branchA" graph) "failed to get branchA"
83 transA <- assertMaybe (transactionForHead "branchA" graph) "failed to get branchA"
85 transB <- assertMaybe (transactionForHead "branchB" graph) "failed to get branchB"
84 transB <- assertMaybe (transactionForHead "branchB" graph) "failed to get branchB"
@@ -128,15 +127,8 @@ testSelectedBranchMerge = TestCase $ do
128 --create the merge transaction in the graph
127 --create the merge transaction in the graph
129 let eGraph' = mergeTransactions (fakeUUID 4) (fakeUUID 10) (SelectedBranchMergeStrategy "branchA") ("branchA", "branchB") graph'
128 let eGraph' = mergeTransactions (fakeUUID 4) (fakeUUID 10) (SelectedBranchMergeStrategy "branchA") ("branchA", "branchB") graph'
132− Left err -> assertFailure ("poop" ++ show err)
133− Right (_, pgraph) -> putStrLn (showGraphStructure pgraph)
137 (DisconnectedTransaction _ mergedContext, graph'') <- assertEither eGraph'
130 (DisconnectedTransaction _ mergedContext, graph'') <- assertEither eGraph'
140 assertGraph graph''
132 assertGraph graph''
141 --validate that the branchB was removed
133 --validate that the branchB was removed
142 rootTrans <- assertEither $ transactionForUUID (fakeUUID 1) graph''
134 rootTrans <- assertEither $ transactionForUUID (fakeUUID 1) graph''