You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expect.equal (HashUtils.deepHash intDict1)(HashUtils.deepHash intDict1)"Same Dictionary should return consistent Hash"
131
+
testCase "1v1'"<|fun _ ->
132
+
Expect.equal (HashUtils.deepHash intDict1)(HashUtils.deepHash intDict1')"Structurally equal Dictionary should return consistent Hash"
133
+
testCase "1v2"<|fun _ ->
134
+
Expect.notEqual (HashUtils.deepHash intDict1)(HashUtils.deepHash intDict2)"Different Dictionary should return different Hash (1vs2)"
135
+
testCase "1v3"<|fun _ ->
136
+
Expect.notEqual (HashUtils.deepHash intDict1)(HashUtils.deepHash intDict3)"Different Dictionary should return different Hash (1vs3)"
137
+
testCase "1v4"<|fun _ ->
138
+
Expect.notEqual (HashUtils.deepHash intDict1)(HashUtils.deepHash intDict4)"Different Dictionary should return different Hash (1vs4)"
139
+
testCase "2v3"<|fun _ ->
140
+
Expect.notEqual (HashUtils.deepHash intDict2)(HashUtils.deepHash intDict3)"Different Dictionary should return different Hash (2vs3)"
141
+
testCase "2v4"<|fun _ ->
142
+
Expect.notEqual (HashUtils.deepHash intDict2)(HashUtils.deepHash intDict4)"Different Dictionary should return different Hash (2vs4)"
143
+
144
+
]
145
+
]
146
+
147
+
lettests_Lists=
148
+
testList "Lists"[
149
+
testList "Shuffled Int"[
150
+
testCase "1v1"<|fun _ ->
151
+
Expect.equal (HashUtils.deepHash intList1)(HashUtils.deepHash intList1)"Same List should return consistent Hash"
152
+
testCase "1v1'"<|fun _ ->
153
+
Expect.equal (HashUtils.deepHash intList1)(HashUtils.deepHash intList1')"Structurally equal List should return consistent Hash"
154
+
testCase "1v2"<|fun _ ->
155
+
Expect.notEqual (HashUtils.deepHash intList1)(HashUtils.deepHash intList2)"Different List should return different Hash"
156
+
]
157
+
testList "Shuffled Nested"[
158
+
testCase "1v1"<|fun _ ->
159
+
Expect.equal (HashUtils.deepHash nestedList1)(HashUtils.deepHash nestedList1)"Same Nested List should return consistent Hash"
160
+
testCase "1v1'"<|fun _ ->
161
+
Expect.equal (HashUtils.deepHash nestedList1)(HashUtils.deepHash nestedList1')"Structurally equal Nested List should return consistent Hash"
162
+
testCase "1v2"<|fun _ ->
163
+
Expect.notEqual (HashUtils.deepHash nestedList1)(HashUtils.deepHash nestedList2)"Different Nested List should return different Hash"
164
+
165
+
]
166
+
]
167
+
168
+
lettests_Array=
169
+
testList "Array"[
170
+
testList "Shuffled Int"[
171
+
testCase "1v1"<|fun _ ->
172
+
Expect.equal (HashUtils.deepHash intArray1)(HashUtils.deepHash intArray1)"Same Array should return consistent Hash"
173
+
testCase "1v1'"<|fun _ ->
174
+
Expect.equal (HashUtils.deepHash intArray1)(HashUtils.deepHash intArray1')"Structurally equal Array should return consistent Hash"
175
+
testCase "1v2"<|fun _ ->
176
+
Expect.notEqual (HashUtils.deepHash intArray1)(HashUtils.deepHash intArray2)"Different Array should return different Hash"
177
+
]
178
+
]
179
+
180
+
lettests_Seq=
181
+
testList "Seq"[
182
+
testList "Shuffled Int"[
183
+
testCase "1v1"<|fun _ ->
184
+
Expect.equal (HashUtils.deepHash intSeq1)(HashUtils.deepHash intSeq1)"Same Seq should return consistent Hash"
185
+
testCase "1v1'"<|fun _ ->
186
+
Expect.equal (HashUtils.deepHash intSeq1)(HashUtils.deepHash intSeq1')"Structurally equal Seq should return consistent Hash"
187
+
testCase "1v2"<|fun _ ->
188
+
Expect.notEqual (HashUtils.deepHash intSeq1)(HashUtils.deepHash intSeq2)"Different Seq should return different Hash"
189
+
]
190
+
]
191
+
192
+
lettests_ResizeArray=
193
+
testList "ResizeArray"[
194
+
testList "Shuffled Int"[
195
+
testCase "1v1"<|fun _ ->
196
+
197
+
Expect.equal (HashUtils.deepHash resizeArray1)(HashUtils.deepHash resizeArray1)"Same ResizeArray should return consistent Hash"
198
+
testCase "1v1'"<|fun _ ->
199
+
Expect.equal (HashUtils.deepHash resizeArray1)(HashUtils.deepHash resizeArray1')"Structurally equal ResizeArray should return consistent Hash"
200
+
testCase "1v2"<|fun _ ->
201
+
Expect.notEqual (HashUtils.deepHash resizeArray1)(HashUtils.deepHash resizeArray2)"Different ResizeArray should return different Hash"
202
+
]
203
+
]
204
+
205
+
206
+
lettests_DynamicObject=
207
+
testList "DynamicObj"[
208
+
testList "Shuffled Int"[
209
+
testCase "1v1"<|fun _ ->
210
+
Expect.equal (HashUtils.deepHash dynamicObjectWithInt1)(HashUtils.deepHash dynamicObjectWithInt1)"Same DynamicObject should return consistent Hash"
211
+
testCase "1v1'"<|fun _ ->
212
+
Expect.equal (HashUtils.deepHash dynamicObjectWithInt1)(HashUtils.deepHash dynamicObjectWithInt1')"Structurally equal DynamicObject should return consistent Hash"
213
+
testCase "1v1DiffKey"<|fun _ ->
214
+
Expect.notEqual (HashUtils.deepHash dynamicObjectWithInt1)(HashUtils.deepHash dynamicObjectWithInt1DiffKey)"Different DynamicObject should return different Hash"
215
+
testCase "1v2"<|fun _ ->
216
+
Expect.notEqual (HashUtils.deepHash dynamicObjectWithInt1)(HashUtils.deepHash dynamicObjectWithInt2)"Different DynamicObject should return different Hash"
217
+
]
218
+
testList "Shuffled Dict"[
219
+
testCase "1v1"<|fun _ ->
220
+
Expect.equal (HashUtils.deepHash dynamicObjectWithDict1)(HashUtils.deepHash dynamicObjectWithDict1)"Same DynamicObject should return consistent Hash"
221
+
testCase "1v1'"<|fun _ ->
222
+
Expect.equal (HashUtils.deepHash dynamicObjectWithDict1)(HashUtils.deepHash dynamicObjectWithDict1')"Structurally equal DynamicObject should return consistent Hash"
223
+
testCase "1v2"<|fun _ ->
224
+
Expect.notEqual (HashUtils.deepHash dynamicObjectWithDict1)(HashUtils.deepHash dynamicObjectWithDict2)"Different DynamicObject should return different Hash"
225
+
]
226
+
testList "Shuffled DynamicObject"[
227
+
testCase "1v1"<|fun _ ->
228
+
Expect.equal (HashUtils.deepHash dynamicObjectWithDynamicObject1)(HashUtils.deepHash dynamicObjectWithDynamicObject1)"Same DynamicObject should return consistent Hash"
229
+
testCase "1v1'"<|fun _ ->
230
+
Expect.equal (HashUtils.deepHash dynamicObjectWithDynamicObject1)(HashUtils.deepHash dynamicObjectWithDynamicObject1')"Structurally equal DynamicObject should return consistent Hash"
231
+
testCase "1v2"<|fun _ ->
232
+
Expect.notEqual (HashUtils.deepHash dynamicObjectWithDynamicObject1)(HashUtils.deepHash dynamicObjectWithDynamicObject2)"Different DynamicObject should return different Hash"
Expect.notEqual (HashUtils.deepHash (Some dynamicObjectWithInt1))(HashUtils.deepHash (Some dynamicObjectWithInt1DiffKey))"Different DynamicObject should return different Hash"
241
+
testCase "1v2"<|fun _ ->
242
+
Expect.notEqual (HashUtils.deepHash (Some dynamicObjectWithInt1))(HashUtils.deepHash (Some dynamicObjectWithInt2))"Different DynamicObject should return different Hash"
243
+
testCase "1 v None"<|fun _ ->
244
+
Expect.notEqual (HashUtils.deepHash (Some dynamicObjectWithInt1))(HashUtils.deepHash None)"Different DynamicObject should return different Hash"
245
+
246
+
]
247
+
testList "Mixed"[
248
+
testCase "Int vs Dict"<|fun _ ->
249
+
Expect.notEqual (HashUtils.deepHash dynamicObjectWithInt1)(HashUtils.deepHash dynamicObjectWithDict1)"Int vs Dict with same values should return different Hash"
250
+
testCase "Dict vs DynObj"<|fun _ ->
251
+
Expect.notEqual (HashUtils.deepHash dynamicObjectWithDict1)(HashUtils.deepHash dynamicObjectWithDynamicObject1)"Dict vs DynObj with same values should return different Hash"
252
+
]
253
+
]
254
+
255
+
256
+
lettests_Mixed=
257
+
testList "Mixed"[
258
+
testCase "Int vs Dict"<|fun _ ->
259
+
Expect.notEqual (HashUtils.deepHash int1)(HashUtils.deepHash intDict1)"Int vs Dict with same values should return different Hash"
260
+
testCase "List vs Dict"<|fun _ ->
261
+
Expect.notEqual (HashUtils.deepHash intList1)(HashUtils.deepHash intDict1)"List vs Dict with same values should return different Hash"
0 commit comments