Update tests to not automatically optimize context when optimize flag is not set
This addresses #57.
--- a/test-suite/tests/compact-0006-context.jsonld Fri Mar 30 22:47:57 2012 +0800
+++ b/test-suite/tests/compact-0006-context.jsonld Sat Mar 31 00:03:30 2012 +0800
@@ -1,7 +1,7 @@
{
"@context": {
"ex": "http://example.org/",
- "term1": "ex:term1",
+ "term1": { "@id": "ex:term1", "@type": "ex:datatype" },
"term2": "ex:term2"
}
-}
\ No newline at end of file
+}
--- a/test-suite/tests/compact-0006-in.jsonld Fri Mar 30 22:47:57 2012 +0800
+++ b/test-suite/tests/compact-0006-in.jsonld Sat Mar 31 00:03:30 2012 +0800
@@ -1,6 +1,6 @@
{
"@id": "http://example.org/id1",
"@type": ["http://example.org/Type1", "http://example.org/Type2"],
- "http://example.org/term1": {"@value": "v1", "@type": "http://example.org/datatype"},
+ "http://example.org/term1": {"@value": "v1", "@type": "http://example.org/different-datatype"},
"http://example.org/term2": {"@id": "http://example.org/id2"}
-}
\ No newline at end of file
+}
--- a/test-suite/tests/compact-0006-out.jsonld Fri Mar 30 22:47:57 2012 +0800
+++ b/test-suite/tests/compact-0006-out.jsonld Sat Mar 31 00:03:30 2012 +0800
@@ -1,14 +1,14 @@
{
- "@context": [{
+ "@context": {
"ex": "http://example.org/",
- "term1": "ex:term1",
+ "term1": {
+ "@id": "ex:term1",
+ "@type": "ex:datatype"
+ },
"term2": "ex:term2"
- }, {
- "term1": {"@type": "ex:datatype"},
- "term2": {"@type": "@id"}
- }],
+ },
"@id": "ex:id1",
"@type": ["ex:Type1", "ex:Type2"],
- "term1": "v1",
- "term2": "ex:id2"
-}
\ No newline at end of file
+ "term1": {"@value": "v1", "@type": "ex:different-datatype"},
+ "term2": {"@id": "ex:id2"}
+}
--- a/test-suite/tests/compact-manifest.jsonld Fri Mar 30 22:47:57 2012 +0800
+++ b/test-suite/tests/compact-manifest.jsonld Sat Mar 31 00:03:30 2012 +0800
@@ -36,12 +36,12 @@
"expect": "compact-0005-out.jsonld"
}, {
"@type": ["test:TestCase", "jld:CompactTest"],
- "name": "compaction optimization",
+ "name": "keep expanded object notion if @type doesn't not 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",
@@ -52,7 +52,7 @@
"name": "alias keywords",
"input": "compact-0008-in.jsonld",
"context": "compact-0008-context.jsonld",
- "expect": "compact-0008-out.jsonld"
+ "expect": "compact-0008-out.jsonld"
}, {
"@type": ["test:TestCase", "jld:CompactTest"],
"name": "compact @id",