@@ -152,34 +152,36 @@ tests = [
152152 testProperty "modify failure" modifyFailureProp
153153 ]
154154 , testGroup "template-haskell" [
155− testGroup "Nullary" [
156− testProperty "string" (isString . thNullaryToJSONString)
157− , testProperty "2ElemArray" (is2ElemArray . thNullaryToJSON2ElemArray)
158− , testProperty "TaggedObject" (isTaggedObjectValue . thNullaryToJSONTaggedObject)
159− , testProperty "ObjectWithSingleField" (isObjectWithSingleField . thNullaryToJSONObjectWithSingleField)
160−
161− , testGroup "roundTrip" [
162− testProperty "string" (toParseJSON thNullaryParseJSONString thNullaryToJSONString)
163− , testProperty "2ElemArray" (toParseJSON thNullaryParseJSON2ElemArray thNullaryToJSON2ElemArray)
164− , testProperty "TaggedObject" (toParseJSON thNullaryParseJSONTaggedObject thNullaryToJSONTaggedObject)
165− , testProperty "ObjectWithSingleField" (toParseJSON thNullaryParseJSONObjectWithSingleField thNullaryToJSONObjectWithSingleField)
166− ]
167− ]
168− , testGroup "SomeType" [
169− testProperty "2ElemArray" (is2ElemArray . (thSomeTypeToJSON2ElemArray :: SomeTypeToJSON))
170− , testProperty "TaggedObject" (isTaggedObject . (thSomeTypeToJSONTaggedObject :: SomeTypeToJSON))
171− , testProperty "ObjectWithSingleField" (isObjectWithSingleField . (thSomeTypeToJSONObjectWithSingleField :: SomeTypeToJSON))
172− , testGroup "roundTrip" [
173− testProperty "2ElemArray" (toParseJSON thSomeTypeParseJSON2ElemArray (thSomeTypeToJSON2ElemArray :: SomeTypeToJSON))
174− , testProperty "TaggedObject" (toParseJSON thSomeTypeParseJSONTaggedObject (thSomeTypeToJSONTaggedObject :: SomeTypeToJSON))
175− , testProperty "ObjectWithSingleField" (toParseJSON thSomeTypeParseJSONObjectWithSingleField (thSomeTypeToJSONObjectWithSingleField :: SomeTypeToJSON))
155+ testGroup "toJSON" [
156+ testGroup "Nullary" [
157+ testProperty "string" (isString . thNullaryToJSONString)
158+ , testProperty "2ElemArray" (is2ElemArray . thNullaryToJSON2ElemArray)
159+ , testProperty "TaggedObject" (isTaggedObjectValue . thNullaryToJSONTaggedObject)
160+ , testProperty "ObjectWithSingleField" (isObjectWithSingleField . thNullaryToJSONObjectWithSingleField)
161+
162+ , testGroup "roundTrip" [
163+ testProperty "string" (toParseJSON thNullaryParseJSONString thNullaryToJSONString)
164+ , testProperty "2ElemArray" (toParseJSON thNullaryParseJSON2ElemArray thNullaryToJSON2ElemArray)
165+ , testProperty "TaggedObject" (toParseJSON thNullaryParseJSONTaggedObject thNullaryToJSONTaggedObject)
166+ , testProperty "ObjectWithSingleField" (toParseJSON thNullaryParseJSONObjectWithSingleField thNullaryToJSONObjectWithSingleField)
167+ ]
176168 ]
177− , testGroup "Approx" [
178− testProperty "string" (isString . (thApproxToJSONUnwrap ::ApproxToJSON))
179− , testProperty "ObjectWithSingleField" (isObjectWithSingleField . (thApproxToJSONDefault ::ApproxToJSON))
169+ , testGroup "SomeType" [
170+ testProperty "2ElemArray" (is2ElemArray . (thSomeTypeToJSON2ElemArray :: SomeTypeToJSON))
171+ , testProperty "TaggedObject" (isTaggedObject . (thSomeTypeToJSONTaggedObject :: SomeTypeToJSON))
172+ , testProperty "ObjectWithSingleField" (isObjectWithSingleField . (thSomeTypeToJSONObjectWithSingleField :: SomeTypeToJSON))
180173 , testGroup "roundTrip" [
181− testProperty "string" (toParseJSON thApproxParseJSONUnwrap (thApproxToJSONUnwrap ::ApproxToJSON))
182− , testProperty "ObjectWithSingleField" (toParseJSON thApproxParseJSONDefault (thApproxToJSONDefault ::ApproxToJSON))
174+ testProperty "2ElemArray" (toParseJSON thSomeTypeParseJSON2ElemArray (thSomeTypeToJSON2ElemArray :: SomeTypeToJSON))
175+ , testProperty "TaggedObject" (toParseJSON thSomeTypeParseJSONTaggedObject (thSomeTypeToJSONTaggedObject :: SomeTypeToJSON))
176+ , testProperty "ObjectWithSingleField" (toParseJSON thSomeTypeParseJSONObjectWithSingleField (thSomeTypeToJSONObjectWithSingleField :: SomeTypeToJSON))
177+ ]
178+ , testGroup "Approx" [
179+ testProperty "string" (isString . (thApproxToJSONUnwrap ::ApproxToJSON))
180+ , testProperty "ObjectWithSingleField" (isObjectWithSingleField . (thApproxToJSONDefault ::ApproxToJSON))
181+ , testGroup "roundTrip" [
182+ testProperty "string" (toParseJSON thApproxParseJSONUnwrap (thApproxToJSONUnwrap ::ApproxToJSON))
183+ , testProperty "ObjectWithSingleField" (toParseJSON thApproxParseJSONDefault (thApproxToJSONDefault ::ApproxToJSON))
184+ ]
183185 ]
184186 ]
185187 ]