Skip to content

Commit a1a4d5a

Browse files
committed
Add type-scoped value tests.
1 parent e18d08d commit a1a4d5a

File tree

7 files changed

+74
-0
lines changed

7 files changed

+74
-0
lines changed

tests/compact-manifest.jsonld

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,15 @@
10851085
"context": "compact/c019-context.jsonld",
10861086
"expect": "compact/c019-out.jsonld",
10871087
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
1088+
}, {
1089+
"@id": "#tc020",
1090+
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
1091+
"name": "type-scoped value",
1092+
"purpose": "type-scoped value",
1093+
"input": "compact/c020-in.jsonld",
1094+
"context": "compact/c020-context.jsonld",
1095+
"expect": "compact/c020-out.jsonld",
1096+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
10881097
}, {
10891098
"@id": "#te001",
10901099
"@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ],

tests/compact/c020-context.jsonld

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"type": "@type",
5+
"Type": {
6+
"@context": {
7+
"value": "@value"
8+
}
9+
}
10+
}
11+
}

tests/compact/c020-in.jsonld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[{
2+
"@type": ["http://example/Type"],
3+
"http://example/v": [{
4+
"@type": "http://example/value-type",
5+
"@value": "value"
6+
}]
7+
}]

tests/compact/c020-out.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"type": "@type",
5+
"Type": {
6+
"@context": {
7+
"value": "@value"
8+
}
9+
}
10+
},
11+
"type": "Type",
12+
"v": {
13+
"value": "value",
14+
"type": "value-type"
15+
}
16+
}

tests/expand-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,14 @@
992992
"input": "expand/c019-in.jsonld",
993993
"expect": "expand/c019-out.jsonld",
994994
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
995+
}, {
996+
"@id": "#tc020",
997+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
998+
"name": "type-scoped value",
999+
"purpose": "type-scoped value",
1000+
"input": "expand/c020-in.jsonld",
1001+
"expect": "expand/c020-out.jsonld",
1002+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
9951003
}, {
9961004
"@id": "#te001",
9971005
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],

tests/expand/c020-in.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"type": "@type",
5+
"Type": {
6+
"@context": {
7+
"value": "@value"
8+
}
9+
}
10+
},
11+
"type": "Type",
12+
"v": {
13+
"value": "value",
14+
"type": "value-type"
15+
}
16+
}

tests/expand/c020-out.jsonld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[{
2+
"@type": ["http://example/Type"],
3+
"http://example/v": [{
4+
"@type": "http://example/value-type",
5+
"@value": "value"
6+
}]
7+
}]

0 commit comments

Comments
 (0)