Skip to content

Commit 5ea3e71

Browse files
committed
Add @graph container tests.
1 parent e81c668 commit 5ea3e71

12 files changed

+132
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {"@id": "foo:input", "@container": "@graph"},
5+
"value": "foo:value"
6+
}
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {"@id": "foo:input", "@container": "@graph"},
5+
"value": "foo:value"
6+
},
7+
"input": {
8+
"value": "x"
9+
}
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {
5+
"@id": "foo:input",
6+
"@container": "@graph"
7+
},
8+
"value": "foo:value"
9+
},
10+
"input": {
11+
"value": "x"
12+
}
13+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
5+
"value": "foo:value"
6+
}
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {"@id": "foo:input", "@container": "@graph"},
5+
"value": "foo:value"
6+
},
7+
"input": {
8+
"value": "x"
9+
}
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {
5+
"@id": "foo:input",
6+
"@container": ["@graph", "@set"]
7+
},
8+
"value": "foo:value"
9+
},
10+
"input": [{
11+
"value": "x"
12+
}]
13+
}

test-suite/tests/compact-manifest.jsonld

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,24 @@
628628
"input": "compact-0076-in.jsonld",
629629
"context": "compact-0076-context.jsonld",
630630
"expect": "compact-0076-out.jsonld"
631+
}, {
632+
"@id": "#t0077",
633+
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
634+
"name": "Compact a @graph container",
635+
"purpose": "Expand and compact a @graph container",
636+
"input": "compact-0077-in.jsonld",
637+
"context": "compact-0077-context.jsonld",
638+
"expect": "compact-0077-out.jsonld",
639+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
640+
}, {
641+
"@id": "#t0078",
642+
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
643+
"name": "Compact a [@graph, @set] container",
644+
"purpose": "Expand a @graph container and compact with [@graph, @set]",
645+
"input": "compact-0078-in.jsonld",
646+
"context": "compact-0078-context.jsonld",
647+
"expect": "compact-0078-out.jsonld",
648+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
631649
}, {
632650
"@id": "#tc001",
633651
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {"@id": "foo:input", "@container": "@graph"},
5+
"value": "foo:value"
6+
},
7+
"input": {
8+
"value": "x"
9+
}
10+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[{
2+
"foo:input": [{
3+
"@graph": [{
4+
"foo:value": [{
5+
"@value": "x"
6+
}]
7+
}]
8+
}]
9+
}]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
5+
"value": "foo:value"
6+
},
7+
"input": [{
8+
"value": "x"
9+
}]
10+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[{
2+
"foo:input": [{
3+
"@graph": [{
4+
"foo:value": [{
5+
"@value": "x"
6+
}]
7+
}]
8+
}]
9+
}]

test-suite/tests/expand-manifest.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,22 @@
558558
"purpose": "Use of multiple reverse properties",
559559
"input": "expand-0078-in.jsonld",
560560
"expect": "expand-0078-out.jsonld"
561+
}, {
562+
"@id": "#t0079",
563+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
564+
"name": "expand @graph container",
565+
"purpose": "Use of @graph containers",
566+
"input": "expand-0079-in.jsonld",
567+
"expect": "expand-0079-out.jsonld",
568+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
569+
}, {
570+
"@id": "#t0080",
571+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
572+
"name": "expand [@graph, @set] container",
573+
"purpose": "Use of [@graph, @set] containers",
574+
"input": "expand-0080-in.jsonld",
575+
"expect": "expand-0080-out.jsonld",
576+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
561577
}, {
562578
"@id": "#tc001",
563579
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],

0 commit comments

Comments
 (0)