Test expansion of native types in type-coerced terms
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 22 Oct 2012 11:08:44 +0200
changeset 915 78fb42c9ed57
parent 914 13684a1320ae
child 916 afd5a7b6da0b
Test expansion of native types in type-coerced terms

This addresses #171.
test-suite/tests/expand-0031-in.jsonld
test-suite/tests/expand-0031-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0031-in.jsonld	Mon Oct 22 11:08:44 2012 +0200
@@ -0,0 +1,13 @@
+{
+  "@context": {
+    "ex": "http://example.org/vocab#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "ex:integer": { "@type": "xsd:integer" },
+    "ex:double": { "@type": "xsd:double" },
+    "ex:boolean": { "@type": "xsd:boolean" }
+  },
+  "@id": "http://example.org/test#example1",
+  "ex:integer": 1,
+  "ex:double": 123.45,
+  "ex:boolean": true
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0031-out.jsonld	Mon Oct 22 11:08:44 2012 +0200
@@ -0,0 +1,17 @@
+[
+  {
+    "@id": "http://example.org/test#example1",
+    "http://example.org/vocab#integer": [ {
+      "@value": 1,
+      "@type": "http://www.w3.org/2001/XMLSchema#integer"
+    } ],
+    "http://example.org/vocab#double": [ {
+      "@value": 123.45,
+      "@type": "http://www.w3.org/2001/XMLSchema#double"
+    } ],
+    "http://example.org/vocab#boolean": [ {
+      "@value": true,
+      "@type": "http://www.w3.org/2001/XMLSchema#boolean"
+    } ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Sun Oct 21 14:38:43 2012 -0700
+++ b/test-suite/tests/expand-manifest.jsonld	Mon Oct 22 11:08:44 2012 +0200
@@ -156,6 +156,11 @@
       "name": "Language maps",
       "input": "expand-0030-in.jsonld",
       "expect": "expand-0030-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "type-coercion of native types",
+      "input": "expand-0031-in.jsonld",
+      "expect": "expand-0031-out.jsonld"
     }
   ]
 }