Expansion test 0023 to check for coercion through @list and @set
authorGregg Kellogg <gregg@kellogg-assoc.com>
Thu, 12 Apr 2012 14:09:47 -0700
changeset 511 942d8fbb39fc
parent 510 4e0b2bba0e9a
child 512 1bac6fd73da4
Expansion test 0023 to check for coercion through @list and @set
test-suite/tests/expand-0023-in.jsonld
test-suite/tests/expand-0023-out.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0023-in.jsonld	Thu Apr 12 14:09:47 2012 -0700
@@ -0,0 +1,21 @@
+{
+  "@context": {
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "idlist": {"@id": "http://example.com/idlist", "@container": "@list", "@type": "@id"},
+    "datelist": {"@id": "http://example.com/datelist", "@container": "@list", "@type": "xsd:date"},
+    "idset": {"@id": "http://example.com/idset", "@container": "@set", "@type": "@id"},
+    "dateset": {"@id": "http://example.com/dateset", "@container": "@set", "@type": "xsd:date"},
+    "idprop": {"@id": "http://example.com/idprop", "@type": "@id" },
+    "dateprop": {"@id": "http://example.com/dateprop", "@type": "xsd:date" },
+    "idprop2": {"@id": "http://example.com/idprop2", "@type": "@id" },
+    "dateprop2": {"@id": "http://example.com/dateprop2", "@type": "xsd:date" }
+  },
+  "idlist": ["http://example.org/id"],
+  "datelist": ["2012-04-12"],
+  "idprop": {"@list": ["http://example.org/id"]},
+  "dateprop": {"@list": ["2012-04-12"]},
+  "idset": ["http://example.org/id"],
+  "dateset": ["2012-04-12"],
+  "idprop2": {"@set": ["http://example.org/id"]},
+  "dateprop2": {"@set": ["2012-04-12"]}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0023-out.jsonld	Thu Apr 12 14:09:47 2012 -0700
@@ -0,0 +1,12 @@
+[
+  {
+    "http://example.com/idlist": [{"@list": [{"@id": "http://example.org/id"}]}],
+    "http://example.com/datelist": [{"@list": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}]}],
+    "http://example.com/idprop": [{"@list": [{"@id": "http://example.org/id"}]}],
+    "http://example.com/dateprop": [{"@list": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}]}],
+    "http://example.com/idset": [{"@id": "http://example.org/id"}],
+    "http://example.com/dateset": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}],
+    "http://example.com/idprop2": [{"@id": "http://example.org/id"}],
+    "http://example.com/dateprop2": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}]
+  }
+]
\ No newline at end of file