Skip to content

Commit

Permalink
Split into 0027 and 0028 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Nov 13, 2024
1 parent fd89aed commit 2c51796
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions tests/fromRdf-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,16 @@
},
"input": "fromRdf/0027-in.nq",
"expect": "fromRdf/0027-out.jsonld"
}, {
"@id": "#t0028",
"@type": ["jld:NegativeEvaluationTest", "jld:FromRDFTest"],
"name": "native types flag set to true is ignored if the number provided is invalid in JSON",
"purpose": "+INF^^xsd:double causes a failure to serialize in JSON.",
"option": {
"useNativeTypes": true
},
"input": "fromRdf/0028-in.nq",
"expectErrorCode": "invalid JSON literal"
}, {
"@id": "#tdi01",
"@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
Expand Down
2 changes: 1 addition & 1 deletion tests/fromRdf/0027-in.nq
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<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> .
<http://example.com/Subj1> <http://example.com/prop> "0.1e999999999999999"^^<http://www.w3.org/2001/XMLSchema#double> .
2 changes: 1 addition & 1 deletion tests/fromRdf/0027-out.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{ "@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"}
{ "@value": "0.1e999999999999999", "@type": "http://www.w3.org/2001/XMLSchema#double"}
]
}
]
1 change: 1 addition & 0 deletions tests/fromRdf/0028-in.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<http://example.com/Subj1> <http://example.com/prop> "+INF"^^<http://www.w3.org/2001/XMLSchema#double> .

0 comments on commit 2c51796

Please sign in to comment.