Skip to content

Add toRdf JSON literal alias tests. #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions tests/toRdf-manifest.html
Original file line number Diff line number Diff line change
Expand Up @@ -6000,6 +6000,62 @@ <h2>
</dd>
</dl>
</dd>
<dt id='tjs16'>
Test tjs16 Transform JSON literal with aliased @type
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tjs16</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ToRDFTest</dd>
<dt>Purpose</dt>
<dd>Tests transforming JSON literal with aliased @type.</dd>
<dt>input</dt>
<dd>
<a href='toRdf/js16-in.jsonld'>toRdf/js16-in.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='toRdf/js16-out.nq'>toRdf/js16-out.nq</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tjs17'>
Test tjs17 Transform JSON literal with aliased @value
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tjs17</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ToRDFTest</dd>
<dt>Purpose</dt>
<dd>Tests transforming JSON literal with aliased @value.</dd>
<dt>input</dt>
<dd>
<a href='toRdf/js17-in.jsonld'>toRdf/js17-in.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='toRdf/js17-out.nq'>toRdf/js17-out.nq</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tli01'>
Test tli01 @list containing @list
</dt>
Expand Down
16 changes: 16 additions & 0 deletions tests/toRdf-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -1836,6 +1836,22 @@
"input": "toRdf/js15-in.jsonld",
"expect": "toRdf/js15-out.nq",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tjs16",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Transform JSON literal with aliased @type",
"purpose": "Tests transforming JSON literal with aliased @type.",
"input": "toRdf/js16-in.jsonld",
"expect": "toRdf/js16-out.nq",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tjs17",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Transform JSON literal with aliased @value",
"purpose": "Tests transforming JSON literal with aliased @value.",
"input": "toRdf/js17-in.jsonld",
"expect": "toRdf/js17-out.nq",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tli01",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
Expand Down
12 changes: 12 additions & 0 deletions tests/toRdf/js16-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": {
"@version": 1.1,
"type": "@type"
},
"ex:foo": {
"type": "@json",
"@value": {
"test": 1
}
}
}
1 change: 1 addition & 0 deletions tests/toRdf/js16-out.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_:b0 <ex:foo> "{\"test\":1}"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .
12 changes: 12 additions & 0 deletions tests/toRdf/js17-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": {
"@version": 1.1,
"value": "@value"
},
"ex:foo": {
"@type": "@json",
"value": {
"test": 1
}
}
}
1 change: 1 addition & 0 deletions tests/toRdf/js17-out.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_:b0 <ex:foo> "{\"test\":1}"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .