Skip to content

Commit 7cecafa

Browse files
davidlehngkellogg
authored andcommitted
Add toRdf JSON literal alias tests.
1 parent dd3dc99 commit 7cecafa

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

tests/toRdf-manifest.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,22 @@
18361836
"input": "toRdf/js15-in.jsonld",
18371837
"expect": "toRdf/js15-out.nq",
18381838
"option": {"specVersion": "json-ld-1.1"}
1839+
}, {
1840+
"@id": "#tjs16",
1841+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
1842+
"name": "Transform JSON literal with aliased @type",
1843+
"purpose": "Tests transforming JSON literal with aliased @type.",
1844+
"input": "toRdf/js16-in.jsonld",
1845+
"expect": "toRdf/js16-out.nq",
1846+
"option": {"specVersion": "json-ld-1.1"}
1847+
}, {
1848+
"@id": "#tjs17",
1849+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
1850+
"name": "Transform JSON literal with aliased @value",
1851+
"purpose": "Tests transforming JSON literal with aliased @value.",
1852+
"input": "toRdf/js17-in.jsonld",
1853+
"expect": "toRdf/js17-out.nq",
1854+
"option": {"specVersion": "json-ld-1.1"}
18391855
}, {
18401856
"@id": "#tli01",
18411857
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],

tests/toRdf/js16-in.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+
"type": "@type"
5+
},
6+
"ex:foo": {
7+
"type": "@json",
8+
"@value": {
9+
"test": 1
10+
}
11+
}
12+
}

tests/toRdf/js16-out.nq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_:b0 <ex:foo> "{\"test\":1}"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .

tests/toRdf/js17-in.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+
"value": "@value"
5+
},
6+
"ex:foo": {
7+
"@type": "@json",
8+
"value": {
9+
"test": 1
10+
}
11+
}
12+
}

tests/toRdf/js17-out.nq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_:b0 <ex:foo> "{\"test\":1}"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .

0 commit comments

Comments
 (0)