Add expansion test (re)defining a compact IRI using itself
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 15 Apr 2013 13:38:16 +0200
changeset 1585 305be96b099e
parent 1584 1ffff52a9b05
child 1586 e0f751d4968c
Add expansion test (re)defining a compact IRI using itself

@dlongley, this currently leads to an error in your implementation. I don't see compelling reason why we should disallow this.
test-suite/tests/expand-0069-in.jsonld
test-suite/tests/expand-0069-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0069-in.jsonld	Mon Apr 15 13:38:16 2013 +0200
@@ -0,0 +1,9 @@
+{
+  "@context": {
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "rdfs:subClassOf": { "@id": "rdfs:subClassOf", "@type": "@id" }
+  },
+  "@id": "http://example.com/vocab#class",
+  "@type": "rdfs:Class",
+  "rdfs:subClassOf": "http://example.com/vocab#someOtherClass"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0069-out.jsonld	Mon Apr 15 13:38:16 2013 +0200
@@ -0,0 +1,9 @@
+[
+  {
+    "@id": "http://example.com/vocab#class",
+    "@type": [ "http://www.w3.org/2000/01/rdf-schema#Class" ],
+    "http://www.w3.org/2000/01/rdf-schema#subClassOf": [
+      { "@id": "http://example.com/vocab#someOtherClass"}
+    ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Wed Apr 10 17:41:36 2013 +0200
+++ b/test-suite/tests/expand-manifest.jsonld	Mon Apr 15 13:38:16 2013 +0200
@@ -410,6 +410,12 @@
       "name": "prefix:suffix values are not interpreted as compact IRIs if prefix is an underscore",
       "input": "expand-0068-in.jsonld",
       "expect": "expand-0068-out.jsonld"
+    }, {
+      "@id": "#t0069",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+      "name": "Redefine compact IRI to define type mapping using the compact IRI itself as value of @id",
+      "input": "expand-0069-in.jsonld",
+      "expect": "expand-0069-out.jsonld"
     }
   ]
 }