Skip to content

Commit 8ba27c6

Browse files
niklaslgkellogg
authored andcommitted
Use separate test files for compact#t0114
1 parent 82d53e1 commit 8ba27c6

File tree

5 files changed

+62
-8
lines changed

5 files changed

+62
-8
lines changed

tests/compact-manifest.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,18 +3222,18 @@ <h2>
32223222
<dt>Type</dt>
32233223
<dd>jld:PositiveEvaluationTest, jld:CompactTest</dd>
32243224
<dt>Purpose</dt>
3225-
<dd>With reverse term using @container: @index and @index set to a property, ensure round-tripping from expaned form</dd>
3225+
<dd>Compaction using a reverse term with @container indexed on a property (round-trip test of expand#t0131)</dd>
32263226
<dt>input</dt>
32273227
<dd>
3228-
<a href='expand/0131-out.jsonld'>expand/0131-out.jsonld</a>
3228+
<a href='compact/0114-in.jsonld'>compact/0114-in.jsonld</a>
32293229
</dd>
32303230
<dt>context</dt>
32313231
<dd>
3232-
<a href='expand/0131-in.jsonld'>expand/0131-in.jsonld</a>
3232+
<a href='compact/0114-context.jsonld'>compact/0114-context.jsonld</a>
32333233
</dd>
32343234
<dt>expect</dt>
32353235
<dd>
3236-
<a href='expand/0131-in.jsonld'>expand/0131-in.jsonld</a>
3236+
<a href='compact/0114-out.jsonld'>compact/0114-out.jsonld</a>
32373237
</dd>
32383238
<dt>Options</dt>
32393239
<dd>

tests/compact-manifest.jsonld

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,10 +961,10 @@
961961
"@id": "#t0114",
962962
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
963963
"name": "Reverse term with property based indexed container",
964-
"purpose": "With reverse term using @container: @index and @index set to a property, ensure round-tripping from expaned form",
965-
"input": "expand/0131-out.jsonld",
966-
"context": "expand/0131-in.jsonld",
967-
"expect": "expand/0131-in.jsonld",
964+
"purpose": "Compaction using a reverse term with @container indexed on a property (round-trip test of expand#t0131)",
965+
"input": "compact/0114-in.jsonld",
966+
"context": "compact/0114-context.jsonld",
967+
"expect": "compact/0114-out.jsonld",
968968
"option": {"base": "https://example.org/", "specVersion": "json-ld-1.1"}
969969
}, {
970970
"@id": "#tc001",

tests/compact/0114-context.jsonld

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@base": "https://example.org/",
5+
"@vocab": "https://example.net/ns#",
6+
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
7+
"statement": {"@reverse": "rdf:subject", "@container": "@index", "@index": "predicate"},
8+
"predicate": {"@id": "rdf:predicate", "@type": "@vocab"},
9+
"term": {"@id": "rdf:object", "@type": "@vocab"},
10+
"addedIn": {"@type": "@id"}
11+
}
12+
}

tests/compact/0114-in.jsonld

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[
2+
{
3+
"@id": "https://example.org/item/1",
4+
"@reverse": {
5+
"http://www.w3.org/1999/02/22-rdf-syntax-ns#subject": [
6+
{
7+
"https://example.net/ns#addedIn": [
8+
{
9+
"@id": "https://example.org/v1"
10+
}
11+
],
12+
"http://www.w3.org/1999/02/22-rdf-syntax-ns#object": [
13+
{
14+
"@id": "https://example.net/ns#A"
15+
}
16+
],
17+
"http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate": [
18+
{
19+
"@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
20+
}
21+
]
22+
}
23+
]
24+
}
25+
}
26+
]

tests/compact/0114-out.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@base": "https://example.org/",
5+
"@vocab": "https://example.net/ns#",
6+
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
7+
"statement": {"@reverse": "rdf:subject", "@container": "@index", "@index": "predicate"},
8+
"predicate": {"@id": "rdf:predicate", "@type": "@vocab"},
9+
"term": {"@id": "rdf:object", "@type": "@vocab"},
10+
"addedIn": {"@type": "@id"}
11+
},
12+
"@id": "item/1",
13+
"statement": {
14+
"rdf:type": {"term": "A", "addedIn": "v1"}
15+
}
16+
}

0 commit comments

Comments
 (0)