Added error tests for Expansion
authorGregg Kellogg <gregg@kellogg-assoc.com>
Mon, 26 Aug 2013 18:17:53 -0700
changeset 1933 4c83a87f7af7
parent 1932 fdadef5c2848
child 1934 063b36fdd3e1
Added error tests for Expansion
test-suite/tests/error-0024-in.jsonld
test-suite/tests/error-0025-in.jsonld
test-suite/tests/error-0026-in.jsonld
test-suite/tests/error-0027-in.jsonld
test-suite/tests/error-0028-in.jsonld
test-suite/tests/error-0029-in.jsonld
test-suite/tests/error-0030-in.jsonld
test-suite/tests/error-0031-in.jsonld
test-suite/tests/error-0032-in.jsonld
test-suite/tests/error-0033-in.jsonld
test-suite/tests/error-0034-in.jsonld
test-suite/tests/error-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0024-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,4 @@
+{
+  "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+  "foo": [{"@list": ["baz"]}]
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0025-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,6 @@
+{
+  "@id": "http://example/foo",
+  "@reverse": {
+    "@id": "http://example/bar"
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0026-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,8 @@
+{
+  "@context": {
+    "id": "@id",
+    "ID": "@id"
+  },
+  "id": "http://example/foo",
+  "ID": "http://example/bar"
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0027-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,3 @@
+{
+  "@id": true
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0028-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,3 @@
+{
+  "@type": true
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0029-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,3 @@
+{
+  "http://example/prop": {"@value": ["foo"]}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0030-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,3 @@
+{
+  "http://example/prop": {"@value": "foo", "@language": true}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0031-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,7 @@
+{
+  "http://example.com/vocab/indexMap": {
+    "@value": "simple string",
+    "@language": "en",
+    "@index": true
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0032-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,3 @@
+{
+  "http://example.com/foo": {"@list": [{"@list": ["baz"]}]}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0033-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,5 @@
+{
+  "http://example/prop": {
+    "@reverse": true
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/error-0034-in.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -0,0 +1,10 @@
+{
+  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name"
+  },
+  "@id": "http://example.com/people/markus",
+  "name": "Markus Lanthaler",
+  "@reverse": {
+    "http://xmlns.com/foaf/0.1/knows": "Dave Longley"
+  }
+}
--- a/test-suite/tests/error-manifest.jsonld	Sun Aug 25 22:52:52 2013 -0700
+++ b/test-suite/tests/error-manifest.jsonld	Mon Aug 26 18:17:53 2013 -0700
@@ -107,7 +107,7 @@
     }, {
       "@id": "#t0015",
       "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
-      "name": " Invalid IRI mapping (@reverse not a string)",
+      "name": "Invalid IRI mapping (@reverse not a string)",
       "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found",
       "input": "error-0015-in.jsonld",
       "expect": "invalid IRI mapping"
@@ -167,6 +167,83 @@
       "purpose": "Verifies that an exception is raised in IRI Expansion when a invalid IRI mapping is found",
       "input": "error-0023-in.jsonld",
       "expect": "invalid IRI mapping"
+    }, {
+      "@id": "#t0024",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "List of lists (from array)",
+      "purpose": "Verifies that an exception is raised in Expansion when a list of lists is found",
+      "input": "error-0024-in.jsonld",
+      "expect": "list of lists"
+    }, {
+      "@id": "#t0025",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid reverse property map",
+      "purpose": "Verifies that an exception is raised in Expansion when a invalid reverse property map is found",
+      "input": "error-0025-in.jsonld",
+      "expect": "invalid reverse property map"
+    }, {
+      "@id": "#t0026",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Colliding keywords",
+      "purpose": "Verifies that an exception is raised in Expansion when colliding keywords are found",
+      "input": "error-0026-in.jsonld",
+      "expect": "colliding keywords"
+    }, {
+      "@id": "#t0027",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid @id value",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid @id value is found",
+      "input": "error-0027-in.jsonld",
+      "expect": "invalid @id value"
+    }, {
+      "@id": "#t0028",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid type value",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid type value is found",
+      "input": "error-0028-in.jsonld",
+      "expect": "invalid type value"
+    }, {
+      "@id": "#t0029",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid value object value",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid value object value is found",
+      "input": "error-0029-in.jsonld",
+      "expect": "invalid value object value"
+    }, {
+      "@id": "#t0030",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid language-tagged string",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid language-tagged string value is found",
+      "input": "error-0030-in.jsonld",
+      "expect": "invalid language-tagged string"
+    }, {
+      "@id": "#t0031",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid @index value",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid @index value value is found",
+      "input": "error-0031-in.jsonld",
+      "expect": "invalid @index value"
+    }, {
+      "@id": "#t0032",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "List of lists (from array)",
+      "purpose": "Verifies that an exception is raised in Expansion when a list of lists is found",
+      "input": "error-0032-in.jsonld",
+      "expect": "list of lists"
+    }, {
+      "@id": "#t0033",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid @reverse value",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid @reverse value is found",
+      "input": "error-0033-in.jsonld",
+      "expect": "invalid @reverse value"
+    }, {
+      "@id": "#t0034",
+      "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+      "name": "Invalid reverse property value",
+      "purpose": "Verifies that an exception is raised in Expansion when an invalid reverse property value is found",
+      "input": "error-0034-in.jsonld",
+      "expect": "invalid reverse property value"
     }
   ]
 }