Skip to content
Next Next commit
Rename scope tests that were confused for map tests.
  • Loading branch information
gkellogg committed Jan 15, 2018
commit ba63075d761255b9bef965e2ce7ebf5b5a288ab2
6 changes: 6 additions & 0 deletions test-suite/tests/compact-c006-context.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example/",
"Foo": {"@context": {"bar": "http://example.org/bar"}}
}
}
7 changes: 7 additions & 0 deletions test-suite/tests/compact-c006-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"@context": {
"@vocab": "http://example/",
"Foo": {"@context": {"bar": "http://example.org/bar"}}
},
"a": {"@type": "Foo", "bar": "baz"}
}
3 changes: 2 additions & 1 deletion test-suite/tests/compact-m007-context.jsonld
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"@context": {
"@vocab": "http://example/",
"Foo": {"@context": {"bar": "http://example.org/bar"}}
"typemap": {"@container": "@type"},
"Type": {"@context": {"a": "http://example.org/a"}}
}
}
13 changes: 5 additions & 8 deletions test-suite/tests/compact-m007-in.jsonld
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[
{
"http://example/a": [{
"@type": ["http://example/Foo"],
"http://example.org/bar": [{"@value": "baz"}]
}]
}
]
[{
"http://example/typemap": [
{"http://example.org/a": [{"@value": "Object with @type <Type>"}], "@type": ["http://example/Type"]}
]
}]
7 changes: 5 additions & 2 deletions test-suite/tests/compact-m007-out.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"@context": {
"@vocab": "http://example/",
"Foo": {"@context": {"bar": "http://example.org/bar"}}
"typemap": {"@container": "@type"},
"Type": {"@context": {"a": "http://example.org/a"}}
},
"a": {"@type": "Foo", "bar": "baz"}
"typemap": {
"Type": {"a": "Object with @type <Type>"}
}
}
7 changes: 0 additions & 7 deletions test-suite/tests/compact-m012-context.jsonld

This file was deleted.

5 changes: 0 additions & 5 deletions test-suite/tests/compact-m012-in.jsonld

This file was deleted.

10 changes: 0 additions & 10 deletions test-suite/tests/compact-m012-out.jsonld

This file was deleted.

92 changes: 46 additions & 46 deletions test-suite/tests/compact-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,51 @@
"context": "compact-c005-context.jsonld",
"expect": "compact-c005-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc006",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "adding new term",
"purpose": "scoped context on @type",
"input": "compact-c006-in.jsonld",
"context": "compact-c006-context.jsonld",
"expect": "compact-c006-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc007",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "overriding a term",
"purpose": "scoped context on @type",
"input": "compact-c007-in.jsonld",
"context": "compact-c007-context.jsonld",
"expect": "compact-c007-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc008",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "alias of @type",
"purpose": "scoped context on @type",
"input": "compact-c008-in.jsonld",
"context": "compact-c008-context.jsonld",
"expect": "compact-c008-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc009",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "deep @context affects nested nodes",
"purpose": "scoped context on @type",
"input": "compact-c009-in.jsonld",
"context": "compact-c009-context.jsonld",
"expect": "compact-c009-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc010",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "scoped context layers on intemediate contexts",
"purpose": "scoped context on @type",
"input": "compact-c010-in.jsonld",
"context": "compact-c010-context.jsonld",
"expect": "compact-c010-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm001",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Expand Down Expand Up @@ -838,57 +883,12 @@
}, {
"@id": "#tm007",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "adding new term",
"name": "When type is in a type map",
"purpose": "scoped context on @type",
"input": "compact-m007-in.jsonld",
"context": "compact-m007-context.jsonld",
"expect": "compact-m007-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm008",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "overriding a term",
"purpose": "scoped context on @type",
"input": "compact-m008-in.jsonld",
"context": "compact-m008-context.jsonld",
"expect": "compact-m008-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm009",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "alias of @type",
"purpose": "scoped context on @type",
"input": "compact-m009-in.jsonld",
"context": "compact-m009-context.jsonld",
"expect": "compact-m009-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm010",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "deep @context affects nested nodes",
"purpose": "scoped context on @type",
"input": "compact-m010-in.jsonld",
"context": "compact-m010-context.jsonld",
"expect": "compact-m010-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm011",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "scoped context layers on intemediate contexts",
"purpose": "scoped context on @type",
"input": "compact-m011-in.jsonld",
"context": "compact-m011-context.jsonld",
"expect": "compact-m011-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm012",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "When type is in a type map",
"purpose": "scoped context on @type",
"input": "compact-m012-in.jsonld",
"context": "compact-m012-context.jsonld",
"expect": "compact-m012-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tn001",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Expand Down
7 changes: 7 additions & 0 deletions test-suite/tests/expand-c006-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"@context": {
"@vocab": "http://example/",
"Foo": {"@context": {"bar": "http://example.org/bar"}}
},
"a": {"@type": "Foo", "bar": "baz"}
}
8 changes: 8 additions & 0 deletions test-suite/tests/expand-c006-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"http://example/a": [{
"@type": ["http://example/Foo"],
"http://example.org/bar": [{"@value": "baz"}]
}]
}
]
8 changes: 8 additions & 0 deletions test-suite/tests/expand-c008-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"http://example/a": [{
"@type": ["http://example/Foo"],
"http://example.org/bar": [{"@value": "baz"}]
}]
}
]
7 changes: 5 additions & 2 deletions test-suite/tests/expand-m008-in.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"@context": {
"@vocab": "http://example/",
"Foo": {"@context": {"bar": "http://example.org/bar"}}
"typemap": {"@container": "@type"},
"Type": {"@context": {"a": "http://example.org/a"}}
},
"a": {"@type": "Foo", "bar": "baz"}
"typemap": {
"Type": {"a": "Object with @type <Type>"}
}
}
13 changes: 5 additions & 8 deletions test-suite/tests/expand-m008-out.jsonld
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[
{
"http://example/a": [{
"@type": ["http://example/Foo"],
"http://example.org/bar": [{"@value": "baz"}]
}]
}
]
[{
"http://example/typemap": [
{"http://example.org/a": [{"@value": "Object with @type <Type>"}], "@type": ["http://example/Type"]}
]
}]
10 changes: 0 additions & 10 deletions test-suite/tests/expand-m013-in.jsonld

This file was deleted.

5 changes: 0 additions & 5 deletions test-suite/tests/expand-m013-out.jsonld

This file was deleted.

82 changes: 41 additions & 41 deletions test-suite/tests/expand-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,46 @@
"input": "expand-c005-in.jsonld",
"expect": "expand-c005-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc006",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "adding new term",
"purpose": "scoped context on @type",
"input": "expand-c006-in.jsonld",
"expect": "expand-c006-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc007",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "overriding a term",
"purpose": "scoped context on @type",
"input": "expand-c007-in.jsonld",
"expect": "expand-c007-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc008",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "alias of @type",
"purpose": "scoped context on @type",
"input": "expand-c008-in.jsonld",
"expect": "expand-c008-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc009",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "deep @context affects nested nodes",
"purpose": "scoped context on @type",
"input": "expand-c009-in.jsonld",
"expect": "expand-c009-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc010",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "scoped context layers on intemediate contexts",
"purpose": "scoped context on @type",
"input": "expand-c010-in.jsonld",
"expect": "expand-c010-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
Expand Down Expand Up @@ -736,51 +776,11 @@
}, {
"@id": "#tm008",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "adding new term",
"name": "When type is in a type map",
"purpose": "scoped context on @type",
"input": "expand-m008-in.jsonld",
"expect": "expand-m008-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm009",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "overriding a term",
"purpose": "scoped context on @type",
"input": "expand-m009-in.jsonld",
"expect": "expand-m009-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm010",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "alias of @type",
"purpose": "scoped context on @type",
"input": "expand-m010-in.jsonld",
"expect": "expand-m010-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm011",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "deep @context affects nested nodes",
"purpose": "scoped context on @type",
"input": "expand-m011-in.jsonld",
"expect": "expand-m011-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm012",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "scoped context layers on intemediate contexts",
"purpose": "scoped context on @type",
"input": "expand-m012-in.jsonld",
"expect": "expand-m012-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tm013",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "When type is in a type map",
"purpose": "scoped context on @type",
"input": "expand-m013-in.jsonld",
"expect": "expand-m013-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tn001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
Expand Down