Add test cases with @id and @context at the bottom
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 09 Jun 2013 19:07:04 +0200
changeset 1715 b62ae665c5d0
parent 1714 ae3b0ff1e844
child 1716 8931799756e6
Add test cases with @id and @context at the bottom

This closes #250
test-suite/tests/expand-0073-in.jsonld
test-suite/tests/expand-0073-out.jsonld
test-suite/tests/expand-0074-in.jsonld
test-suite/tests/expand-0074-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0073-in.jsonld	Sun Jun 09 19:07:04 2013 +0200
@@ -0,0 +1,16 @@
+{
+  "@id": "ex:node1",
+  "owl:sameAs": {
+    "@id": "ex:node2",
+    "rdfs:label": "Node 2",
+    "link": "ex:node3",
+    "@context": {
+      "rdfs": "http://www.w3.org/2000/01/rdf-schema#"
+    }
+  },
+  "@context": {
+    "ex": "http://example.org/",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "link": { "@id": "ex:link", "@type": "@id" }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0073-out.jsonld	Sun Jun 09 19:07:04 2013 +0200
@@ -0,0 +1,14 @@
+[
+  {
+    "@id": "http://example.org/node1",
+    "http://www.w3.org/2002/07/owl#sameAs": [
+      {
+        "@id": "http://example.org/node2",
+        "http://example.org/link": [
+          { "@id": "http://example.org/node3" }
+        ],
+        "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Node 2" } ]
+      }
+    ]
+  }
+]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0074-in.jsonld	Sun Jun 09 19:07:04 2013 +0200
@@ -0,0 +1,19 @@
+{
+  "@context": {
+    "ex": "http://example.org/",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "link": {
+      "@id": "ex:link",
+      "@type": "@id"
+    }
+  },
+  "owl:sameAs": {
+    "@context": {
+      "rdfs": "http://www.w3.org/2000/01/rdf-schema#"
+    },
+    "rdfs:label": "Node 2",
+    "link": "ex:node3",
+    "@id": "ex:node2"
+  },
+  "@id": "ex:node1"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0074-out.jsonld	Sun Jun 09 19:07:04 2013 +0200
@@ -0,0 +1,14 @@
+[
+  {
+    "@id": "http://example.org/node1",
+    "http://www.w3.org/2002/07/owl#sameAs": [
+      {
+        "@id": "http://example.org/node2",
+        "http://example.org/link": [
+          { "@id": "http://example.org/node3" }
+        ],
+        "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Node 2" } ]
+      }
+    ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Sun Jun 09 18:57:15 2013 +0200
+++ b/test-suite/tests/expand-manifest.jsonld	Sun Jun 09 19:07:04 2013 +0200
@@ -438,6 +438,18 @@
       "name": "Redefine term using @vocab, not itself",
       "input": "expand-0072-in.jsonld",
       "expect": "expand-0072-out.jsonld"
+    }, {
+      "@id": "#t0073",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+      "name": "Ensure that processors don't require that @context is first property",
+      "input": "expand-0073-in.jsonld",
+      "expect": "expand-0073-out.jsonld"
+    }, {
+      "@id": "#t0074",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+      "name": "Ensure that processors don't require that @id is the first property",
+      "input": "expand-0074-in.jsonld",
+      "expect": "expand-0074-out.jsonld"
     }
   ]
 }