@@ -23,21 +23,25 @@ tests = testGroup "data families" [
23
23
testProperty " string" (isString . thNullaryToJSONString)
24
24
, testProperty " 2ElemArray" (is2ElemArray . thNullaryToJSON2ElemArray)
25
25
, testProperty " TaggedObject" (isNullaryTaggedObject . thNullaryToJSONTaggedObject)
26
+ , testProperty " TaggedFlatObject" (isNullaryTaggedObject . thNullaryToJSONTaggedFlatObject)
26
27
, testProperty " ObjectWithSingleField" (isObjectWithSingleField . thNullaryToJSONObjectWithSingleField)
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
]
34
36
, testGroup " SomeType" [
35
37
testProperty " 2ElemArray" (is2ElemArray . thSomeTypeToJSON2ElemArray)
36
38
, testProperty " TaggedObject" (isTaggedObject . thSomeTypeToJSONTaggedObject)
39
+ , testProperty " TaggedFlatObject" (isTaggedObject . thSomeTypeToJSONTaggedFlatObject)
37
40
, testProperty " ObjectWithSingleField" (isObjectWithSingleField . thSomeTypeToJSONObjectWithSingleField)
38
41
, testGroup " roundTrip" [
39
42
testProperty " 2ElemArray" (toParseJSON thSomeTypeParseJSON2ElemArray thSomeTypeToJSON2ElemArray)
40
43
, testProperty " TaggedObject" (toParseJSON thSomeTypeParseJSONTaggedObject thSomeTypeToJSONTaggedObject)
44
+ , testProperty " TaggedFlatObject" (toParseJSON thSomeTypeParseJSONTaggedFlatObject thSomeTypeToJSONTaggedFlatObject)
41
45
, testProperty " ObjectWithSingleField" (toParseJSON thSomeTypeParseJSONObjectWithSingleField thSomeTypeToJSONObjectWithSingleField)
42
46
]
43
47
]
@@ -65,6 +69,8 @@ tests = testGroup "data families" [
65
69
thNullaryToJSON2ElemArray `sameAs` thNullaryToEncoding2ElemArray
66
70
, testProperty " NullaryTaggedObject" $
67
71
thNullaryToJSONTaggedObject `sameAs` thNullaryToEncodingTaggedObject
72
+ , testProperty " NullaryTaggedFlatObject" $
73
+ thNullaryToJSONTaggedFlatObject `sameAs` thNullaryToEncodingTaggedFlatObject
68
74
, testProperty " NullaryObjectWithSingleField" $
69
75
thNullaryToJSONObjectWithSingleField `sameAs`
70
76
thNullaryToEncodingObjectWithSingleField
@@ -76,6 +82,8 @@ tests = testGroup "data families" [
76
82
thSomeTypeToJSON2ElemArray `sameAs` thSomeTypeToEncoding2ElemArray
77
83
, testProperty " SomeTypeTaggedObject" $
78
84
thSomeTypeToJSONTaggedObject `sameAs` thSomeTypeToEncodingTaggedObject
85
+ , testProperty " SomeTypeTaggedFlatObject" $
86
+ thSomeTypeToJSONTaggedFlatObject `sameAs` thSomeTypeToEncodingTaggedFlatObject
79
87
, testProperty " SomeTypeObjectWithSingleField" $
80
88
thSomeTypeToJSONObjectWithSingleField `sameAs`
81
89
thSomeTypeToEncodingObjectWithSingleField
@@ -88,21 +96,25 @@ tests = testGroup "data families" [
88
96
testProperty " string" (isString . gNullaryToJSONString)
89
97
, testProperty " 2ElemArray" (is2ElemArray . gNullaryToJSON2ElemArray)
90
98
, testProperty " TaggedObject" (isNullaryTaggedObject . gNullaryToJSONTaggedObject)
99
+ , testProperty " TaggedFlatObject" (isNullaryTaggedObject . gNullaryToJSONTaggedFlatObject)
91
100
, testProperty " ObjectWithSingleField" (isObjectWithSingleField . gNullaryToJSONObjectWithSingleField)
92
101
, testGroup " roundTrip" [
93
102
testProperty " string" (toParseJSON gNullaryParseJSONString gNullaryToJSONString)
94
103
, testProperty " 2ElemArray" (toParseJSON gNullaryParseJSON2ElemArray gNullaryToJSON2ElemArray)
95
104
, testProperty " TaggedObject" (toParseJSON gNullaryParseJSONTaggedObject gNullaryToJSONTaggedObject)
105
+ , testProperty " TaggedFlatObject" (toParseJSON gNullaryParseJSONTaggedFlatObject gNullaryToJSONTaggedFlatObject)
96
106
, testProperty " ObjectWithSingleField" (toParseJSON gNullaryParseJSONObjectWithSingleField gNullaryToJSONObjectWithSingleField)
97
107
]
98
108
]
99
109
, testGroup " SomeType" [
100
110
testProperty " 2ElemArray" (is2ElemArray . gSomeTypeToJSON2ElemArray)
101
111
, testProperty " TaggedObject" (isTaggedObject . gSomeTypeToJSONTaggedObject)
112
+ , testProperty " TaggedFlatObject" (isTaggedObject . gSomeTypeToJSONTaggedFlatObject)
102
113
, testProperty " ObjectWithSingleField" (isObjectWithSingleField . gSomeTypeToJSONObjectWithSingleField)
103
114
, testGroup " roundTrip" [
104
115
testProperty " 2ElemArray" (toParseJSON gSomeTypeParseJSON2ElemArray gSomeTypeToJSON2ElemArray)
105
116
, testProperty " TaggedObject" (toParseJSON gSomeTypeParseJSONTaggedObject gSomeTypeToJSONTaggedObject)
117
+ , testProperty " TaggedFlatObject" (toParseJSON gSomeTypeParseJSONTaggedFlatObject gSomeTypeToJSONTaggedFlatObject)
106
118
, testProperty " ObjectWithSingleField" (toParseJSON gSomeTypeParseJSONObjectWithSingleField gSomeTypeToJSONObjectWithSingleField)
107
119
]
108
120
]
@@ -122,6 +134,8 @@ tests = testGroup "data families" [
122
134
gNullaryToJSON2ElemArray `sameAs` gNullaryToEncoding2ElemArray
123
135
, testProperty " NullaryTaggedObject" $
124
136
gNullaryToJSONTaggedObject `sameAs` gNullaryToEncodingTaggedObject
137
+ , testProperty " NullaryTaggedFlatObject" $
138
+ gNullaryToJSONTaggedFlatObject `sameAs` gNullaryToEncodingTaggedFlatObject
125
139
, testProperty " NullaryObjectWithSingleField" $
126
140
gNullaryToJSONObjectWithSingleField `sameAs`
127
141
gNullaryToEncodingObjectWithSingleField
@@ -133,6 +147,8 @@ tests = testGroup "data families" [
133
147
gSomeTypeToJSON2ElemArray `sameAs` gSomeTypeToEncoding2ElemArray
134
148
, testProperty " SomeTypeTaggedObject" $
135
149
gSomeTypeToJSONTaggedObject `sameAs` gSomeTypeToEncodingTaggedObject
150
+ , testProperty " SomeTypeTaggedFlatObject" $
151
+ gSomeTypeToJSONTaggedFlatObject `sameAs` gSomeTypeToEncodingTaggedFlatObject
136
152
, testProperty " SomeTypeObjectWithSingleField" $
137
153
gSomeTypeToJSONObjectWithSingleField `sameAs`
138
154
gSomeTypeToEncodingObjectWithSingleField
0 commit comments