Skip to content

Commit 8f49ccd

Browse files
fromRdf-manifest.jsonld#t0027 to test "+INF"^^xsd:double
1 parent 5c95152 commit 8f49ccd

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

tests/fromRdf-manifest.jsonld

+10
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,16 @@
195195
"purpose": "Check list generation with rdf:first property and rdf:nil value.",
196196
"input": "fromRdf/0026-in.nq",
197197
"expect": "fromRdf/0026-out.jsonld"
198+
}, {
199+
"@id": "#t0027",
200+
"@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
201+
"name": "native types flag set to true is ignored if the number provided is invalid in JSON",
202+
"purpose": "Literals with datatype xsd:boolean, xsd:integer, and xsd:double are serialized using native scalar values if possible",
203+
"option": {
204+
"useNativeTypes": true
205+
},
206+
"input": "fromRdf/0027-in.nq",
207+
"expect": "fromRdf/0027-out.jsonld"
198208
}, {
199209
"@id": "#tdi01",
200210
"@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],

tests/fromRdf/0027-in.nq

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<http://example.com/Subj1> <http://example.com/prop> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
2+
<http://example.com/Subj1> <http://example.com/prop> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
3+
<http://example.com/Subj1> <http://example.com/prop> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
4+
<http://example.com/Subj1> <http://example.com/prop> "1.1"^^<http://www.w3.org/2001/XMLSchema#decimal> .
5+
<http://example.com/Subj1> <http://example.com/prop> "+INF"^^<http://www.w3.org/2001/XMLSchema#double> .

tests/fromRdf/0027-out.jsonld

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"@id": "http://example.com/Subj1",
4+
"http://example.com/prop": [
5+
{ "@value": true },
6+
{ "@value": false },
7+
{ "@value": 1 },
8+
{ "@value": "1.1", "@type": "http://www.w3.org/2001/XMLSchema#decimal"},
9+
{ "@value": "+INF", "@type": "http://www.w3.org/2001/XMLSchema#double"}
10+
]
11+
}
12+
]

0 commit comments

Comments
 (0)