Merge pull request #251 from levkhomich/master
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 22 May 2013 23:29:25 -0700
changeset 1678 de17039267d8
parent 1676 e4c171297726 (current diff)
parent 1677 0d89790f4751 (diff)
child 1679 93bf4e7a31f4
Merge pull request #251 from levkhomich/master

Test the conversion to RDF does not depend on order position of @id and @context
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/toRdf-0032-in.jsonld	Wed May 22 23:29:25 2013 -0700
@@ -0,0 +1,17 @@
+{
+  "@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/toRdf-0032-out.nq	Wed May 22 23:29:25 2013 -0700
@@ -0,0 +1,3 @@
+<http://example.org/node1> <http://www.w3.org/2002/07/owl#sameAs> <http://example.org/node2> .
+<http://example.org/node2> <http://www.w3.org/2000/01/rdf-schema#label> "Node 2" .
+<http://example.org/node2> <http://example.org/link> <http://example.org/node3> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/toRdf-0033-in.jsonld	Wed May 22 23:29:25 2013 -0700
@@ -0,0 +1,17 @@
+{
+  "@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/toRdf-0033-out.nq	Wed May 22 23:29:25 2013 -0700
@@ -0,0 +1,3 @@
+<http://example.org/node1> <http://www.w3.org/2002/07/owl#sameAs> <http://example.org/node2> .
+<http://example.org/node2> <http://www.w3.org/2000/01/rdf-schema#label> "Node 2" .
+<http://example.org/node2> <http://example.org/link> <http://example.org/node3> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/toRdf-0034-in.jsonld	Wed May 22 23:29:25 2013 -0700
@@ -0,0 +1,17 @@
+{
+  "@context": {
+    "link": {
+	  "@id": "ex:link",
+	  "@type": "@id"
+	},
+    "ex": "http://example.org/",
+    "owl": "http://www.w3.org/2002/07/owl#"
+  },
+  "@id": "ex:node1",
+  "owl:sameAs": {
+    "@context": {"rdfs": "http://www.w3.org/2000/01/rdf-schema#"},
+    "@id": "ex:node2",
+	"rdfs:label": "Node 2",
+	"link": "ex:node3"
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/toRdf-0034-out.nq	Wed May 22 23:29:25 2013 -0700
@@ -0,0 +1,3 @@
+<http://example.org/node1> <http://www.w3.org/2002/07/owl#sameAs> <http://example.org/node2> .
+<http://example.org/node2> <http://www.w3.org/2000/01/rdf-schema#label> "Node 2" .
+<http://example.org/node2> <http://example.org/link> <http://example.org/node3> .
--- a/test-suite/tests/toRdf-manifest.jsonld	Wed May 22 12:46:21 2013 -0400
+++ b/test-suite/tests/toRdf-manifest.jsonld	Wed May 22 23:29:25 2013 -0700
@@ -216,6 +216,27 @@
       "purpose": "Tests conversion of reverse properties.",
       "input": "toRdf-0031-in.jsonld",
       "expect": "toRdf-0031-out.nq"
+    }, {
+      "@id": "#t0031",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
+      "name": "@context reordering",
+      "purpose": "Tests that generated triples do not depend on order of @context.",
+      "input": "toRdf-0032-in.jsonld",
+      "expect": "toRdf-0032-out.nq"
+    }, {
+      "@id": "#t0032",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
+      "name": "@id reordering",
+      "purpose": "Tests that generated triples do not depend on order of @id.",
+      "input": "toRdf-0033-in.jsonld",
+      "expect": "toRdf-0033-out.nq"
+    }, {
+      "@id": "#t0033",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
+      "name": "context properties reordering",
+      "purpose": "Tests that generated triples do not depend on order of properties inside @context.",
+      "input": "toRdf-0034-in.jsonld",
+      "expect": "toRdf-0034-out.nq"
     }
   ]
 }