Ensure that test output is deterministic
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 05 Dec 2012 14:43:52 +0100
changeset 992 9c7c6f1d3b85
parent 991 a982f900734e
child 993 4d1e56e4ebd8
Ensure that test output is deterministic

I have to revise that statement I made in f9637de00e3582fa205e741cde8177fbfd288f63. I think the test runner would become too complex if array order is ignored for sets (how do you know it's a set?). Instead, also in expansion the properties should be sorted before being processed.

I will update the algorithms accordingly the next days.
test-suite/tests/expand-0034-in.jsonld
test-suite/tests/expand-0034-out.jsonld
--- a/test-suite/tests/expand-0034-in.jsonld	Wed Dec 05 12:36:25 2012 +0100
+++ b/test-suite/tests/expand-0034-in.jsonld	Wed Dec 05 14:43:52 2012 +0100
@@ -4,11 +4,11 @@
     "colliding": "http://example.com/vocab/collidingTerm"
   },
   "@id": "http://example.com/IriCollissions",
-  "collidingTerm": [
+  "colliding": [
     "value 1",
     2
   ],
-  "colliding": [
+  "collidingTerm": [
     3,
     "four"
   ],
--- a/test-suite/tests/expand-0034-out.jsonld	Wed Dec 05 12:36:25 2012 +0100
+++ b/test-suite/tests/expand-0034-out.jsonld	Wed Dec 05 14:43:52 2012 +0100
@@ -2,8 +2,6 @@
    "@id": "http://example.com/IriCollissions",
    "http://example.com/vocab/collidingTerm": [
       {
-         "@value": 5
-      }, {
          "@value": "value 1"
       }, {
          "@value": 2
@@ -11,6 +9,9 @@
          "@value": 3
       }, {
          "@value": "four"
+      },
+      {
+         "@value": 5
       }
    ]
 }]