Skip to content
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

testing rdf:JSON #125

Open
pfps opened this issue Jun 29, 2024 · 3 comments
Open

testing rdf:JSON #125

pfps opened this issue Jun 29, 2024 · 3 comments

Comments

@pfps
Copy link
Contributor

pfps commented Jun 29, 2024

How will rdf:JSON be tested?

(Put here because the test repository does not have the labels for WG discussion.)

@gkellogg
Copy link
Member

Other than testing for literals that are lexically invalid, equality should probably be done in a SPARQL 1.2 version of the expo-equals tests from 1.0. Although, note that there are no such tests for rdf:XMLLiteral or rdf:HTML. Generally, those tests have been done in the RDF/XML and RDFa test suites, to the degree that they can.

The rdf-mt test suite has an entailment test for inconsistency in XMLLiteral terms (rdfs-entailment-test001).

The N-Quads, N-Quads, Turtle, and TriG test suites have tests that include XMLLiterals (test-subm-01), but just tests parsing.

SPARQL 1.1 has an entailment test for XMLLIteral (rdfs08).

RDF/XML has a single xml-canon test, which really tests that the RDF Literal value extracted from the XML is appropriate and does not test values.

RDFa also has some XMLLiteral tests, but I don't see any HTML Literal tests.

rdf:XMLLiteral and rdf:HTML do most of their testing (other than for values) in their respective test suites. JSON-LD also has a number of rdf:JSON tests (e.g., js01). Most tests that don't involve values or equality probably belong in the JSON-LD test suite. Other tests probably in the SPARQL test suite.

(Aside, the RDF-star project does also track tests from the RDF-tests repo, so I'd say it's worth keeping test-specific issues in that repo).

@pfps
Copy link
Contributor Author

pfps commented Jun 29, 2024

I think that there needs to be RDF tests that test the various aspects of rdf:JSON. Otherwise how can the requirement of two interoperating implementations be determined?

One kind of test would be entailment tests that show how rdf:JSON literals are processed, such as:
:a :b "1E400"^^rdf:JSON .
entails
:a :b "1E401"^^rdf:JSON .
and
:a :b "1E401"^^rdf:JSON .
does not entail
:a :b "null"^^rdf:JSON .
and
:a :b "0"^^rdf:JSON .
does not entail
:a :b "-0"^^rdf:JSON .

@pfps
Copy link
Contributor Author

pfps commented Nov 20, 2024

See w3c/rdf-tests#152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants