@@ -73,7 +73,7 @@ testList :: Test
7373testList = TestList [testADT1, testADT2, testADT3, testADT4, testADT6, testADT7, testADT8]
7474
7575testADT1 :: Test
76−testADT1 = TestCase $ assertEqual "one record constructor" example (fromTuple (toTuple example))
76+testADT1 = TestCase $ assertEqual "one record constructor" (Right example) (fromTuple (toTuple example))
7777 where
7878 example = Test1C {attrA = 3}
7979
@@ -81,7 +81,7 @@ testADT1 = TestCase $ assertEqual "one record constructor" example (fromTuple (t
8181testADT2 :: Test
8282testADT2 = TestCase $ do
8383 let example = Test2C { attrB = 4, attrC = 6 }
84− assertEqual "two record constructor" example (fromTuple (toTuple example))
84+ assertEqual "two record constructor" (Right example) (fromTuple (toTuple example))
8585 --this was a tricky case that was throwing the undefined exception because of insufficient laziness in the :*: matching- see ProjectM36.Tupleable
8686 let expectedAttributes = attributesFromList [Attribute "attrB" IntAtomType,
8787 Attribute "attrC" IntAtomType]
@@ -89,30 +89,30 @@ testADT2 = TestCase $ do
8989
9090
9191testADT3 :: Test
92−testADT3 = TestCase $ assertEqual "one arg constructor" example (fromTuple (toTuple example))
92+testADT3 = TestCase $ assertEqual "one arg constructor" (Right example) (fromTuple (toTuple example))
9393 where
9494 example = Test3C 4
9595
9696testADT4 :: Test
97−testADT4 = TestCase $ assertEqual "zero arg constructor" example (fromTuple (toTuple example))
97+testADT4 = TestCase $ assertEqual "zero arg constructor" (Right example) (fromTuple (toTuple example))
9898 where
9999 example = Test4C
100100
101101--testADT5 should not compile
102102
103103testADT6 :: Test
104−testADT6 = TestCase $ assertEqual "mixed types" example (fromTuple (toTuple example))
104+testADT6 = TestCase $ assertEqual "mixed types" (Right example) (fromTuple (toTuple example))
105105 where
106106 example = Test6C "testo" 3 4.0
107107
108108testADT7 :: Test
109109testADT7 = TestCase $ do
110110 let example = Test7C (Test7AC 3)
111− assertEqual "atom type" example (fromTuple (toTuple example))
111+ assertEqual "atom type" (Right example) (fromTuple (toTuple example))
112112 let expectedAttrs = V.singleton (Attribute "" (ConstructedAtomType "Test7A" M.empty))
113113 assertEqual "adt atomtype" expectedAttrs (toAttributes (undefined :: Test7T))
114114
115115testADT8 :: Test
116−testADT8 = TestCase $ assertEqual "single value" example (fromTuple (toTuple example))
116+testADT8 = TestCase $ assertEqual "single value" (Right example) (fromTuple (toTuple example))
117117 where
118118 example = Test8C