@@ -22,12 +22,14 @@ templateHaskellTests =
22
22
testProperty " string" (isString . thNullaryToJSONString)
23
23
, testProperty " 2ElemArray" (is2ElemArray . thNullaryToJSON2ElemArray)
24
24
, testProperty " TaggedObject" (isNullaryTaggedObject . thNullaryToJSONTaggedObject)
25
+ , testProperty " TaggedFlatObject" (isNullaryTaggedObject . thNullaryToJSONTaggedFlatObject)
25
26
, testProperty " ObjectWithSingleField" (isObjectWithSingleField . thNullaryToJSONObjectWithSingleField)
26
27
27
28
, testGroup " roundTrip" [
28
29
testProperty " string" (toParseJSON thNullaryParseJSONString thNullaryToJSONString)
29
30
, testProperty " 2ElemArray" (toParseJSON thNullaryParseJSON2ElemArray thNullaryToJSON2ElemArray)
30
31
, testProperty " TaggedObject" (toParseJSON thNullaryParseJSONTaggedObject thNullaryToJSONTaggedObject)
32
+ , testProperty " TaggedFlatObject" (toParseJSON thNullaryParseJSONTaggedFlatObject thNullaryToJSONTaggedFlatObject)
31
33
, testProperty " ObjectWithSingleField" (toParseJSON thNullaryParseJSONObjectWithSingleField thNullaryToJSONObjectWithSingleField)
32
34
]
33
35
]
@@ -38,14 +40,17 @@ templateHaskellTests =
38
40
, testGroup " SomeType" [
39
41
testProperty " 2ElemArray" (is2ElemArray . thSomeTypeToJSON2ElemArray)
40
42
, testProperty " TaggedObject" (isTaggedObject . thSomeTypeToJSONTaggedObject)
43
+ , testProperty " TaggedFlatObject" (isTaggedObject . thSomeTypeToJSONTaggedFlatObject)
41
44
, testProperty " ObjectWithSingleField" (isObjectWithSingleField . thSomeTypeToJSONObjectWithSingleField)
42
45
, testGroup " roundTrip" [
43
46
testProperty " 2ElemArray" (toParseJSON thSomeTypeParseJSON2ElemArray thSomeTypeToJSON2ElemArray)
44
47
, testProperty " TaggedObject" (toParseJSON thSomeTypeParseJSONTaggedObject thSomeTypeToJSONTaggedObject)
48
+ , testProperty " TaggedFlatObject" (toParseJSON thSomeTypeParseJSONTaggedFlatObject thSomeTypeToJSONTaggedFlatObject)
45
49
, testProperty " ObjectWithSingleField" (toParseJSON thSomeTypeParseJSONObjectWithSingleField thSomeTypeToJSONObjectWithSingleField)
46
50
47
51
, testProperty " 2ElemArray unary" (toParseJSON1 thSomeTypeLiftParseJSON2ElemArray thSomeTypeLiftToJSON2ElemArray)
48
52
, testProperty " TaggedObject unary" (toParseJSON1 thSomeTypeLiftParseJSONTaggedObject thSomeTypeLiftToJSONTaggedObject)
53
+ , testProperty " TaggedFlatObject unary" (toParseJSON1 thSomeTypeLiftParseJSONTaggedFlatObject thSomeTypeLiftToJSONTaggedFlatObject)
49
54
, testProperty " ObjectWithSingleField unary" (toParseJSON1 thSomeTypeLiftParseJSONObjectWithSingleField thSomeTypeLiftToJSONObjectWithSingleField)
50
55
51
56
]
@@ -87,6 +92,8 @@ templateHaskellTests =
87
92
thNullaryToJSON2ElemArray `sameAs` thNullaryToEncoding2ElemArray
88
93
, testProperty " NullaryTaggedObject" $
89
94
thNullaryToJSONTaggedObject `sameAs` thNullaryToEncodingTaggedObject
95
+ , testProperty " NullaryTaggedFlatObject" $
96
+ thNullaryToJSONTaggedFlatObject `sameAs` thNullaryToEncodingTaggedFlatObject
90
97
, testProperty " NullaryObjectWithSingleField" $
91
98
thNullaryToJSONObjectWithSingleField `sameAs`
92
99
thNullaryToEncodingObjectWithSingleField
@@ -112,6 +119,13 @@ templateHaskellTests =
112
119
, testProperty " SomeTypeTaggedObject unary agree" $
113
120
thSomeTypeToEncodingTaggedObject `sameAs1Agree` thSomeTypeLiftToEncodingTaggedObject
114
121
122
+ , testProperty " SomeTypeTaggedFlatObject" $
123
+ thSomeTypeToJSONTaggedFlatObject `sameAs` thSomeTypeToEncodingTaggedFlatObject
124
+ , testProperty " SomeTypeTaggedFlatObject unary" $
125
+ thSomeTypeLiftToJSONTaggedFlatObject `sameAs1` thSomeTypeLiftToEncodingTaggedFlatObject
126
+ , testProperty " SomeTypeTaggedFlatObject unary agree" $
127
+ thSomeTypeToEncodingTaggedFlatObject `sameAs1Agree` thSomeTypeLiftToEncodingTaggedFlatObject
128
+
115
129
, testProperty " SomeTypeObjectWithSingleField" $
116
130
thSomeTypeToJSONObjectWithSingleField `sameAs` thSomeTypeToEncodingObjectWithSingleField
117
131
, testProperty " SomeTypeObjectWithSingleField unary" $
0 commit comments