Skip to content

Commit

Permalink
fromRdf-manifest.jsonld#t0027 to test "+INF"^^xsd:double
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Nov 8, 2024
1 parent 5c95152 commit 8f49ccd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/fromRdf-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,16 @@
"purpose": "Check list generation with rdf:first property and rdf:nil value.",
"input": "fromRdf/0026-in.nq",
"expect": "fromRdf/0026-out.jsonld"
}, {
"@id": "#t0027",
"@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
"name": "native types flag set to true is ignored if the number provided is invalid in JSON",
"purpose": "Literals with datatype xsd:boolean, xsd:integer, and xsd:double are serialized using native scalar values if possible",
"option": {
"useNativeTypes": true
},
"input": "fromRdf/0027-in.nq",
"expect": "fromRdf/0027-out.jsonld"
}, {
"@id": "#tdi01",
"@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
Expand Down
5 changes: 5 additions & 0 deletions tests/fromRdf/0027-in.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<http://example.com/Subj1> <http://example.com/prop> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Subj1> <http://example.com/prop> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Subj1> <http://example.com/prop> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Subj1> <http://example.com/prop> "1.1"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.com/Subj1> <http://example.com/prop> "+INF"^^<http://www.w3.org/2001/XMLSchema#double> .
12 changes: 12 additions & 0 deletions tests/fromRdf/0027-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"@id": "http://example.com/Subj1",
"http://example.com/prop": [
{ "@value": true },
{ "@value": false },
{ "@value": 1 },
{ "@value": "1.1", "@type": "http://www.w3.org/2001/XMLSchema#decimal"},
{ "@value": "+INF", "@type": "http://www.w3.org/2001/XMLSchema#double"}
]
}
]

0 comments on commit 8f49ccd

Please sign in to comment.