# HG changeset patch # User Jan Vrany # Date 1414364947 0 # Node ID 4643ebc30c243bb10723f78fdb5f2ef661d57430 # Parent 0a78e48d766a2657de3c04f023fb420fb203d006 Fixed dictionary (map) JSON test. Make it independent on key order (which depends on hashing algorithm) diff -r 0a78e48d766a -r 4643ebc30c24 s/tests/BenchmarkReportJSONWriterTests.st --- a/s/tests/BenchmarkReportJSONWriterTests.st Mon Oct 13 10:56:03 2014 +0100 +++ b/s/tests/BenchmarkReportJSONWriterTests.st Sun Oct 26 23:09:07 2014 +0000 @@ -73,17 +73,19 @@ ! testMaps - | writer dictionary | + | writer dictionary json | dictionary := Dictionary new. dictionary at: #x put: 1. dictionary at: #y put: 2. writer := [ :object | String streamContents: [ :stream | (BenchmarkReportJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: dictionary) equals: '{"x": 1,"y": 2}'. - self assert: (writer value: Dictionary new) equals: '{}'. + json := writer value: dictionary. + self assert: (json = '{"x": 1,"y": 2}' or:[ json = '{"y": 2,"x": 1}' ]). + json := writer value: Dictionary new. + self assert: json = '{}' - "Modified: / 12-06-2013 / 13:23:25 / Jan Vrany " + "Modified: / 26-10-2014 / 23:08:07 / Jan Vrany " ! testNull