Add test to ensure that @vocab compaction isn't used if the result collides with a term
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 19 Dec 2012 20:53:29 +0100
changeset 1068 721b31f972ba
parent 1067 65f6f9a00739
child 1069 1f34fdc238bb
Add test to ensure that @vocab compaction isn't used if the result collides with a term
test-suite/tests/compact-0043-context.jsonld
test-suite/tests/compact-0043-in.jsonld
test-suite/tests/compact-0043-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0043-context.jsonld	Wed Dec 19 20:53:29 2012 +0100
@@ -0,0 +1,6 @@
+{
+  "@context": {
+    "@vocab": "http://example.com/",
+    "name": "http://xmlns.com/foaf/0.1/name"
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0043-in.jsonld	Wed Dec 19 20:53:29 2012 +0100
@@ -0,0 +1,8 @@
+[
+  {
+    "@id": "http://example.com/node",
+    "http://example.com/name": [
+      { "@value": "Markus Lanthaler" }
+    ]
+  }
+]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0043-out.jsonld	Wed Dec 19 20:53:29 2012 +0100
@@ -0,0 +1,8 @@
+{
+  "@context": {
+    "@vocab": "http://example.com/",
+     "name": "http://xmlns.com/foaf/0.1/name"
+  },
+  "@id": "http://example.com/node",
+  "http://example.com/name": "Markus Lanthaler"
+}
--- a/test-suite/tests/compact-manifest.jsonld	Wed Dec 19 20:19:46 2012 +0100
+++ b/test-suite/tests/compact-manifest.jsonld	Wed Dec 19 20:53:29 2012 +0100
@@ -5,258 +5,266 @@
   "rdfs:comment": "JSON-LD to Compaction tests use object compare",
   "name": "compact",
   "baseIri": "http://json-ld.org/test-suite/tests/",
-  "sequence": [{
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "id",
-    "input": "compact-0001-in.jsonld",
-    "context": "compact-0001-context.jsonld",
-    "expect": "compact-0001-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "basic",
-    "input": "compact-0002-in.jsonld",
-    "context": "compact-0002-context.jsonld",
-    "expect": "compact-0002-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "drop null and unmapped properties",
-    "input": "compact-0003-in.jsonld",
-    "context": "compact-0003-context.jsonld",
-    "expect": "compact-0003-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "optimize @set, keep empty arrays",
-    "input": "compact-0004-in.jsonld",
-    "context": "compact-0004-context.jsonld",
-    "expect": "compact-0004-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "@type and prefix compaction",
-    "input": "compact-0005-in.jsonld",
-    "context": "compact-0005-context.jsonld",
-    "expect": "compact-0005-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "keep expanded object format if @type doesn't match",
-    "input": "compact-0006-in.jsonld",
-    "context": "compact-0006-context.jsonld",
-    "expect": "compact-0006-out.jsonld",
-    "optimize": true
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "add context",
-    "input": "compact-0007-in.jsonld",
-    "context": "compact-0007-context.jsonld",
-    "expect": "compact-0007-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "alias keywords",
-    "input": "compact-0008-in.jsonld",
-    "context": "compact-0008-context.jsonld",
-    "expect": "compact-0008-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "compact @id",
-    "input": "compact-0009-in.jsonld",
-    "context": "compact-0009-context.jsonld",
-    "expect": "compact-0009-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "array to @graph",
-    "input": "compact-0010-in.jsonld",
-    "context": "compact-0010-context.jsonld",
-    "expect": "compact-0010-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "compact date",
-    "input": "compact-0011-in.jsonld",
-    "context": "compact-0011-context.jsonld",
-    "expect": "compact-0011-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "native types",
-    "input": "compact-0012-in.jsonld",
-    "context": "compact-0012-context.jsonld",
-    "expect": "compact-0012-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "@value with @language",
-    "input": "compact-0013-in.jsonld",
-    "context": "compact-0013-context.jsonld",
-    "expect": "compact-0013-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "array to aliased @graph",
-    "input": "compact-0014-in.jsonld",
-    "context": "compact-0014-context.jsonld",
-    "expect": "compact-0014-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "best match compaction",
-    "input": "compact-0015-in.jsonld",
-    "context": "compact-0015-context.jsonld",
-    "expect": "compact-0015-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "recursive named graphs",
-    "input": "compact-0016-in.jsonld",
-    "context": "compact-0016-context.jsonld",
-    "expect": "compact-0016-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "A term mapping to null removes the mapping",
-    "input": "compact-0017-in.jsonld",
-    "context": "compact-0017-context.jsonld",
-    "expect": "compact-0017-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "best matching term for lists",
-    "input": "compact-0018-in.jsonld",
-    "context": "compact-0018-context.jsonld",
-    "expect": "compact-0018-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Keep duplicate values in @list and @set",
-    "input": "compact-0019-in.jsonld",
-    "context": "compact-0019-context.jsonld",
-    "expect": "compact-0019-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Compact @id that is a property IRI when @container is @list",
-    "input": "compact-0020-in.jsonld",
-    "context": "compact-0020-context.jsonld",
-    "expect": "compact-0020-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Compact properties and types using @vocab",
-    "input": "compact-0021-in.jsonld",
-    "context": "compact-0021-context.jsonld",
-    "expect": "compact-0021-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Compact nested properties using @list containers",
-    "input": "compact-0022-in.jsonld",
-    "context": "compact-0022-context.jsonld",
-    "expect": "compact-0022-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Prefixes have precedence over @vocab - even if the result is longer",
-    "input": "compact-0023-in.jsonld",
-    "context": "compact-0023-context.jsonld",
-    "expect": "compact-0023-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "The most specific term that matches all of the elements in the list, taking into account the default language, must be selected.",
-    "input": "compact-0024-in.jsonld",
-    "context": "compact-0024-context.jsonld",
-    "expect": "compact-0024-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Language maps",
-    "input": "compact-0025-in.jsonld",
-    "context": "compact-0025-context.jsonld",
-    "expect": "compact-0025-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Using language maps with @vocab, a default language, and a competing term",
-    "input": "compact-0026-in.jsonld",
-    "context": "compact-0026-context.jsonld",
-    "expect": "compact-0026-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Fall back to term with @set container if term with language map is defined",
-    "input": "compact-0027-in.jsonld",
-    "context": "compact-0027-context.jsonld",
-    "expect": "compact-0027-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Alias keywords and use @vocab",
-    "input": "compact-0028-in.jsonld",
-    "context": "compact-0028-context.jsonld",
-    "expect": "compact-0028-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Simple @annotation map",
-    "input": "compact-0029-in.jsonld",
-    "context": "compact-0029-context.jsonld",
-    "expect": "compact-0029-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Preserve @annotation tags if not compacted to an annotation map",
-    "input": "compact-0030-in.jsonld",
-    "context": "compact-0030-context.jsonld",
-    "expect": "compact-0030-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Compacting property generators (no type coercions, language mappings etc.)",
-    "input": "compact-0031-in.jsonld",
-    "context": "compact-0031-context.jsonld",
-    "expect": "compact-0031-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Complex property generator test case with multiple colliding IRIs",
-    "input": "compact-0032-in.jsonld",
-    "context": "compact-0032-context.jsonld",
-    "expect": "compact-0032-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Use shortest property generator term",
-    "input": "compact-0033-in.jsonld",
-    "context": "compact-0033-context.jsonld",
-    "expect": "compact-0033-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Choose most specific property generator",
-    "input": "compact-0034-in.jsonld",
-    "context": "compact-0034-context.jsonld",
-    "expect": "compact-0034-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Fall back to more generic property generators",
-    "input": "compact-0035-in.jsonld",
-    "context": "compact-0035-context.jsonld",
-    "expect": "compact-0035-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Fall back to terms if no property generator matches",
-    "input": "compact-0036-in.jsonld",
-    "context": "compact-0036-context.jsonld",
-    "expect": "compact-0036-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Property generator round-tripping (Drupal content syndication)",
-    "input": "compact-0037-in.jsonld",
-    "context": "compact-0037-context.jsonld",
-    "expect": "compact-0037-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Annotation map round-tripping (Drupal content deployment)",
-    "input": "compact-0038-in.jsonld",
-    "context": "compact-0038-context.jsonld",
-    "expect": "compact-0038-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Value of @graph is always an array, do not compact @id objects",
-    "input": "compact-0039-in.jsonld",
-    "context": "compact-0039-context.jsonld",
-    "expect": "compact-0039-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Ensure that value of @list is always an array",
-    "input": "compact-0040-in.jsonld",
-    "context": "compact-0040-context.jsonld",
-    "expect": "compact-0040-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "If an annotation is present, a term having an @list container is not selected",
-    "input": "compact-0041-in.jsonld",
-    "context": "compact-0041-context.jsonld",
-    "expect": "compact-0041-out.jsonld"
-  }, {
-    "@type": ["test:TestCase", "jld:CompactTest"],
-    "name": "Make sure keyword aliasing works if a list can't be compacted",
-    "input": "compact-0042-in.jsonld",
-    "context": "compact-0042-context.jsonld",
-    "expect": "compact-0042-out.jsonld"
-  }]
+  "sequence": [
+    {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "id",
+      "input": "compact-0001-in.jsonld",
+      "context": "compact-0001-context.jsonld",
+      "expect": "compact-0001-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "basic",
+      "input": "compact-0002-in.jsonld",
+      "context": "compact-0002-context.jsonld",
+      "expect": "compact-0002-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "drop null and unmapped properties",
+      "input": "compact-0003-in.jsonld",
+      "context": "compact-0003-context.jsonld",
+      "expect": "compact-0003-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "optimize @set, keep empty arrays",
+      "input": "compact-0004-in.jsonld",
+      "context": "compact-0004-context.jsonld",
+      "expect": "compact-0004-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "@type and prefix compaction",
+      "input": "compact-0005-in.jsonld",
+      "context": "compact-0005-context.jsonld",
+      "expect": "compact-0005-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "keep expanded object format if @type doesn't match",
+      "input": "compact-0006-in.jsonld",
+      "context": "compact-0006-context.jsonld",
+      "expect": "compact-0006-out.jsonld",
+      "optimize": true
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "add context",
+      "input": "compact-0007-in.jsonld",
+      "context": "compact-0007-context.jsonld",
+      "expect": "compact-0007-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "alias keywords",
+      "input": "compact-0008-in.jsonld",
+      "context": "compact-0008-context.jsonld",
+      "expect": "compact-0008-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "compact @id",
+      "input": "compact-0009-in.jsonld",
+      "context": "compact-0009-context.jsonld",
+      "expect": "compact-0009-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "array to @graph",
+      "input": "compact-0010-in.jsonld",
+      "context": "compact-0010-context.jsonld",
+      "expect": "compact-0010-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "compact date",
+      "input": "compact-0011-in.jsonld",
+      "context": "compact-0011-context.jsonld",
+      "expect": "compact-0011-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "native types",
+      "input": "compact-0012-in.jsonld",
+      "context": "compact-0012-context.jsonld",
+      "expect": "compact-0012-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "@value with @language",
+      "input": "compact-0013-in.jsonld",
+      "context": "compact-0013-context.jsonld",
+      "expect": "compact-0013-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "array to aliased @graph",
+      "input": "compact-0014-in.jsonld",
+      "context": "compact-0014-context.jsonld",
+      "expect": "compact-0014-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "best match compaction",
+      "input": "compact-0015-in.jsonld",
+      "context": "compact-0015-context.jsonld",
+      "expect": "compact-0015-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "recursive named graphs",
+      "input": "compact-0016-in.jsonld",
+      "context": "compact-0016-context.jsonld",
+      "expect": "compact-0016-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "A term mapping to null removes the mapping",
+      "input": "compact-0017-in.jsonld",
+      "context": "compact-0017-context.jsonld",
+      "expect": "compact-0017-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "best matching term for lists",
+      "input": "compact-0018-in.jsonld",
+      "context": "compact-0018-context.jsonld",
+      "expect": "compact-0018-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Keep duplicate values in @list and @set",
+      "input": "compact-0019-in.jsonld",
+      "context": "compact-0019-context.jsonld",
+      "expect": "compact-0019-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Compact @id that is a property IRI when @container is @list",
+      "input": "compact-0020-in.jsonld",
+      "context": "compact-0020-context.jsonld",
+      "expect": "compact-0020-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Compact properties and types using @vocab",
+      "input": "compact-0021-in.jsonld",
+      "context": "compact-0021-context.jsonld",
+      "expect": "compact-0021-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Compact nested properties using @list containers",
+      "input": "compact-0022-in.jsonld",
+      "context": "compact-0022-context.jsonld",
+      "expect": "compact-0022-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Prefixes have precedence over @vocab - even if the result is longer",
+      "input": "compact-0023-in.jsonld",
+      "context": "compact-0023-context.jsonld",
+      "expect": "compact-0023-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "The most specific term that matches all of the elements in the list, taking into account the default language, must be selected.",
+      "input": "compact-0024-in.jsonld",
+      "context": "compact-0024-context.jsonld",
+      "expect": "compact-0024-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Language maps",
+      "input": "compact-0025-in.jsonld",
+      "context": "compact-0025-context.jsonld",
+      "expect": "compact-0025-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Using language maps with @vocab, a default language, and a competing term",
+      "input": "compact-0026-in.jsonld",
+      "context": "compact-0026-context.jsonld",
+      "expect": "compact-0026-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Fall back to term with @set container if term with language map is defined",
+      "input": "compact-0027-in.jsonld",
+      "context": "compact-0027-context.jsonld",
+      "expect": "compact-0027-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Alias keywords and use @vocab",
+      "input": "compact-0028-in.jsonld",
+      "context": "compact-0028-context.jsonld",
+      "expect": "compact-0028-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Simple @annotation map",
+      "input": "compact-0029-in.jsonld",
+      "context": "compact-0029-context.jsonld",
+      "expect": "compact-0029-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Preserve @annotation tags if not compacted to an annotation map",
+      "input": "compact-0030-in.jsonld",
+      "context": "compact-0030-context.jsonld",
+      "expect": "compact-0030-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Compacting property generators (no type coercions, language mappings etc.)",
+      "input": "compact-0031-in.jsonld",
+      "context": "compact-0031-context.jsonld",
+      "expect": "compact-0031-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Complex property generator test case with multiple colliding IRIs",
+      "input": "compact-0032-in.jsonld",
+      "context": "compact-0032-context.jsonld",
+      "expect": "compact-0032-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Use shortest property generator term",
+      "input": "compact-0033-in.jsonld",
+      "context": "compact-0033-context.jsonld",
+      "expect": "compact-0033-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Choose most specific property generator",
+      "input": "compact-0034-in.jsonld",
+      "context": "compact-0034-context.jsonld",
+      "expect": "compact-0034-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Fall back to more generic property generators",
+      "input": "compact-0035-in.jsonld",
+      "context": "compact-0035-context.jsonld",
+      "expect": "compact-0035-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Fall back to terms if no property generator matches",
+      "input": "compact-0036-in.jsonld",
+      "context": "compact-0036-context.jsonld",
+      "expect": "compact-0036-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Property generator round-tripping (Drupal content syndication)",
+      "input": "compact-0037-in.jsonld",
+      "context": "compact-0037-context.jsonld",
+      "expect": "compact-0037-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Annotation map round-tripping (Drupal content deployment)",
+      "input": "compact-0038-in.jsonld",
+      "context": "compact-0038-context.jsonld",
+      "expect": "compact-0038-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Value of @graph is always an array, do not compact @id objects",
+      "input": "compact-0039-in.jsonld",
+      "context": "compact-0039-context.jsonld",
+      "expect": "compact-0039-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Ensure that value of @list is always an array",
+      "input": "compact-0040-in.jsonld",
+      "context": "compact-0040-context.jsonld",
+      "expect": "compact-0040-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "If an annotation is present, a term having an @list container is not selected",
+      "input": "compact-0041-in.jsonld",
+      "context": "compact-0041-context.jsonld",
+      "expect": "compact-0041-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Make sure keyword aliasing works if a list can't be compacted",
+      "input": "compact-0042-in.jsonld",
+      "context": "compact-0042-context.jsonld",
+      "expect": "compact-0042-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Ensure that @vocab compaction isn't used if the result collides with a term",
+      "input": "compact-0043-in.jsonld",
+      "context": "compact-0043-context.jsonld",
+      "expect": "compact-0043-out.jsonld"
+    }
+  ]
 }