From 020c9dfcfcc0f51400f1e32b977e9551a9eae7af Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Tue, 28 Oct 2025 23:21:10 -0400 Subject: [PATCH 1/2] Improve test fromRdf#t0027. - Improving the test coverage for use useNativeTypes algorithm in 8.5.2 2.4. - Remove the "True" and "False" boolean tests that can cause confusion that those words are special values. - Add tests using a value of "notnative" typed to boolean, integer, and double. These test that the type will be preserved when a native conversion does not happen. --- tests/fromRdf/0027-in.nq | 6 ++++-- tests/fromRdf/0027-out.jsonld | 14 +++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/fromRdf/0027-in.nq b/tests/fromRdf/0027-in.nq index 03ea5251..1c00a5a0 100644 --- a/tests/fromRdf/0027-in.nq +++ b/tests/fromRdf/0027-in.nq @@ -4,11 +4,13 @@ "1"^^ . "0"^^ . - "True"^^ . - "False"^^ . + "notnative"^^ . "1"^^ . "0.1e999999999999999"^^ . "+INF"^^ . "-INF"^^ . + + "notnative"^^ . + "notnative"^^ . diff --git a/tests/fromRdf/0027-out.jsonld b/tests/fromRdf/0027-out.jsonld index 1744119d..76f6c8b9 100644 --- a/tests/fromRdf/0027-out.jsonld +++ b/tests/fromRdf/0027-out.jsonld @@ -18,11 +18,7 @@ "http://example.com/example": [ { "@type": "http://www.w3.org/2001/XMLSchema#boolean", - "@value": "True" - }, - { - "@type": "http://www.w3.org/2001/XMLSchema#boolean", - "@value": "False" + "@value": "notnative" } ] }, @@ -46,6 +42,14 @@ { "@type": "http://www.w3.org/2001/XMLSchema#double", "@value": "-INF" + }, + { + "@type": "http://www.w3.org/2001/XMLSchema#integer", + "@value": "notnative" + }, + { + "@type": "http://www.w3.org/2001/XMLSchema#double", + "@value": "notnative" } ] } From 53fa13cf6f166697f15b58ab01ea3400c5367c57 Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Wed, 29 Oct 2025 15:48:44 -0400 Subject: [PATCH 2/2] Restore True and False tests. Restoring True and False tests to check only strict lexical values are converted to native values. --- tests/fromRdf/0027-in.nq | 2 ++ tests/fromRdf/0027-out.jsonld | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/tests/fromRdf/0027-in.nq b/tests/fromRdf/0027-in.nq index 1c00a5a0..08159c8e 100644 --- a/tests/fromRdf/0027-in.nq +++ b/tests/fromRdf/0027-in.nq @@ -4,6 +4,8 @@ "1"^^ . "0"^^ . + "True"^^ . + "False"^^ . "notnative"^^ . "1"^^ . diff --git a/tests/fromRdf/0027-out.jsonld b/tests/fromRdf/0027-out.jsonld index 76f6c8b9..f857800c 100644 --- a/tests/fromRdf/0027-out.jsonld +++ b/tests/fromRdf/0027-out.jsonld @@ -16,6 +16,14 @@ { "@id": "http://example.com/boolean-object", "http://example.com/example": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + "@value": "True" + }, + { + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + "@value": "False" + }, { "@type": "http://www.w3.org/2001/XMLSchema#boolean", "@value": "notnative"