# RDF 1.2 Semantics tests

Copyright © 2004-2023 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.

## Abstract

These test suites are a product of the W3C RDF & SPARQL Working Group as well as the RDF-Star Interest Group within the W3C RDF-DEV Community Group, and has been maintained by the RDF Test Curation Community Group at https://github.com/w3c/rdf-tests/tree/main/rdf/rdf11. Conformance with RDF 1.2 specifications can be determined via successfully running the tests for relevant specifications along with the relevant RDF 1.1 tests.

This page describes W3C RDF & SPARQL Working Group's test suite for RDF 1.2. Conformance for RDF 1.2 requires conforming with tests in this test suite along with the relevant RDF 1.2 tests.

### Contributing Tests

The test manifests and entries are built automatically from manifest.ttl using a Rake task. Tests may be contributed via pull request to https://github.com/w3c/rdf-tests with suitable changes to the manifest.ttl and referenced files.

### Distribution

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License. To contribute to a W3C Test Suite, see the policies and contribution forms.

### Disclaimer

UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

## Test Descriptions

all-identical-triple-terms-are-the-same: all-identical-triple-terms-are-the-same

  Multiple occurences of the same triple terms are undistinguishable in the abstract model.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test001a.ttl
  result
    test001r.ttl
triple-terms-no-spurious: quoted-triples-no-spurious

  This test ensures that other entailments are not spurious.

  type
    mf:NegativeEntailmentTest
  approval
  action
    test002a.ttl
  result
    test005.ttl
bnodes-in-triple-term-subject: bnodes-in-triple-term-subject

  Terms inside triple terms can be replaced by fresh bnodes.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test002a.ttl
  result
    test002sr.ttl
bnodes-in-triple-term-object: bnodes-in-triple-term-object

  Terms inside triple terms can be replaced by fresh bnodes.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test002a.ttl
  result
    test002or.ttl
bnodes-in-triple-term-subject-and-object: bnodes-in-triple-term-subject-and-object

  Terms inside triple terms can be replaced by fresh bnodes.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test002a.ttl
  result
    test002sor.ttl
bnodes-in-triple-term-subject-and-object-fail: bnodes-in-triple-term-subject-and-object-fail

  The same bnode can not match different triple terms.

  type
    mf:NegativeEntailmentTest
  approval
  action
    test002a.ttl
  result
    test002sbr.ttl
same-bnode-same-triple-term: same-bnode-same-quoted-term

  Identical triple term can be replaced by the same fresh bnode multiple times.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test003a.ttl
  result
    test002sbr.ttl
different-bnodes-same-triple-term: different-bnodes-same-triple-term

  Different bnodes can match identical triple terms.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test003a.ttl
  result
    test002sor.ttl
constrained-bnodes-in-triple-term-subject: constrained-bnodes-in-triple-term-subject

  Terms inside and outside triple terms can be replaced by fresh bnodes

  type
    mf:PositiveEntailmentTest
  approval
  action
    test004a.ttl
  result
    test004sr.ttl
constrained-bnodes-in-triple-term-object: constrained-bnodes-in-triple-term-object

  Terms inside and outside triple terms can be replaced by fresh bnodes.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test004a.ttl
  result
    test004or.ttl
constrained-bnodes-in-triple-term-fail: constrained-bnodes-in-triple-term-fail

  Quoted bnode identifiers share the same scope as non-quoted ones. A bnode that occurs both inside triple terms and inside asserted triples must satisfy all occurrences at the same time.

  type
    mf:NegativeEntailmentTest
  approval
  action
    test004a.ttl
  result
    test004fr.ttl
constrained-bnodes-on-literal: constrained-bnodes-on-literal

  Literals inside and outside triple terms can be replaced by fresh bnodes.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test006a.ttl
  result
    test006r.ttl
malformed-literal-control: malformed-literal-control

  Checks that xsd:integer is indeed recognized, to ensure that malformed-literal-* tests do not pass spuriously.

  type
    mf:PositiveEntailmentTest
  approval
  action
    malformed-literal-control.ttl
malformed-literal: malformed-literal

  Malformed literals are allowed when in triple terms.

  type
    mf:NegativeEntailmentTest
  approval
  action
    malformed-literal.ttl
malformed-literal-accepted: malformed-literal-accepted

  Malformed literals are allowed when in triple terms.

  type
    mf:PositiveEntailmentTest
  approval
  action
    malformed-literal.ttl
  result
    malformed-literal.ttl
malformed-literal-no-spurious: malformed-literal-no-spurious

  Malformed literals within triple terms do not lead to spurious entailment.

  type
    mf:NegativeEntailmentTest
  approval
  action
    malformed-literal.ttl
  result
    malformed-literal-other.ttl
malformed-literal-bnode-neg: malformed-literal-bnode

  Malformed literals can not be replaced by blank nodes.

  type
    mf:NegativeEntailmentTest
  approval
  action
    malformed-literal.ttl
  result
    test002or.ttl
opaque-literal-control: opaque-literal-control

  Checks that xsd:integer is indeed recognized, to ensure that opaque-literal does not pass spuriously.

  type
    mf:PositiveEntailmentTest
  approval
  action
    non-canonical-literal-control.ttl
  result
    canonical-literal-control.ttl
opaque-literal: opaque-literal

  Literals within triple terms are opaque, even when their datatype is recognized.

  type
    mf:NegativeEntailmentTest
  approval
  action
    non-canonical-literal.ttl
  result
    canonical-literal.ttl
opaque-language-string-control: opaque-language-string-control

  Checks that language strings are indeed recognized, to ensure that opaque-language-string does not pass spuriously.

  type
    mf:PositiveEntailmentTest
  approval
  action
    lowercase-language-string-control.ttl
  result
    uppercase-language-string-control.ttl
opaque-language-string: opaque-language-string

  Literals within reifying terms (including language strings) are opaque, even when their datatype is recognized.

  type
    mf:NegativeEntailmentTest
  approval
  action
    lowercase-language-string.ttl
  result
    uppercase-language-string.ttl
opaque-iri-control: opaque-iri-control

  Check that owl:sameAs works as expected, to ensure that opaque-iri does not pass spuriously.

  type
    mf:PositiveEntailmentTest
  approval
  action
    control-sameas-a.ttl
  result
    control-sameas-r.ttl
opaque-iri: opaque-iri

  Triple term IRIs are opaque.

  type
    mf:NegativeEntailmentTest
  approval
  action
    superman.ttl
  result
    superman_undesired_entailment.ttl
triple-term-not-asserted: triple-term-not-asserted

  Triple terms are not asserted.

  type
    mf:NegativeEntailmentTest
  approval
  action
    test002a.ttl
  result
    test002pgr.ttl
annotated-asserted: annotated-asserted

  Annotated triples are asserted.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test007a.ttl
  result
    test007r1.ttl
annotation: annotation

  Annotation are about the reifying triple.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test007a.ttl
  result
    test007r2.ttl
annotation-unfolded: annotation-unfolded

  Annotation is the same as separate assertions.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test007a2.ttl
  result
    test007a.ttl
json-array-ordered: json-array-unordered

  Arrays are ordered in rdf:JSON.

  type
    mf:NegativeEntailmentTest
  approval
  action
    json-array-1.ttl
  result
    json-array-2.ttl
json-object-unordered: json-object-unordered

  Objects are unordered in rdf:JSON.

  type
    mf:PositiveEntailmentTest
  approval
  action
    json-object-1.ttl
  result
    json-object-2.ttl
json-zero: json-zero

  Positive zero and negative zero are different in rdf:JSON.

  type
    mf:NegativeEntailmentTest
  approval
  action
    json-positive-zero.ttl
  result
    json-negative-zero.ttl
json-zero-array: json-zero-array

  Positive zero and negative zero are different in rdf:JSON inside arrays.

  type
    mf:NegativeEntailmentTest
  approval
  action
    json-positive-zero-array.ttl
  result
    json-negative-zero-array.ttl
json-round-different: json-round-different

  Rounding to different even rdf:JSON.

  type
    mf:NegativeEntailmentTest
  approval
  action
    json-9007199254740990-5.ttl
  result
    json-9007199254740991-5.ttl
json-round-same: json-round-same

  Rounding to same even rdf:JSON.

  type
    mf:PositiveEntailmentTest
  approval
  action
    json-9007199254740992-5.ttl
  result
    json-9007199254740991-5.ttl
json-infinity: json-infinity

  Large rdf:JSON number values are infinity.

  type
    mf:PositiveEntailmentTest
  approval
  action
    json-e400.ttl
  result
    json-e401.ttl
float-zero: float-zero

  Positive zero and negative zero are different in xsd:float.

  type
    mf:NegativeEntailmentTest
  approval
  action
    float-positive-zero.ttl
  result
    float-negative-zero.ttl
float-round-different: float-round-different

  Rounding to different even xsd:float.

  type
    mf:NegativeEntailmentTest
  approval
  action
    float-16777206-5.ttl
  result
    float-16777207-5.ttl
float-round-same: float-round-same

  Rounding to same even xsd:float.

  type
    mf:PositiveEntailmentTest
  approval
  action
    float-16777206-5.ttl
  result
    float-16777205-5.ttl
float-infinity: float-infinity

  Large xsd:float values are infinity.

  type
    mf:PositiveEntailmentTest
  approval
  action
    float-e400.ttl
  result
    float-e401.ttl
double-zero: double-zero

  Positive zero and negative zero are different in xsd:double.

  type
    mf:NegativeEntailmentTest
  approval
  action
    double-positive-zero.ttl
  result
    double-negative-zero.ttl
double-round-different: double-round-different

  Rounding to different even xsd:double.

  type
    mf:NegativeEntailmentTest
  approval
  action
    double-9007199254740990-5.ttl
  result
    double-9007199254740991-5.ttl
double-round-same: double-round-same

  Rounding to same even xsd:double.

  type
    mf:PositiveEntailmentTest
  approval
  action
    double-9007199254740992-5.ttl
  result
    double-9007199254740991-5.ttl
double-infinity: double-infinity

  Large xsd:double values are infinity.

  type
    mf:PositiveEntailmentTest
  approval
  action
    double-e400.ttl
  result
    double-e401.ttl
triple-terms-propositions: triple-terms-propositions

  Triple terms denote instances of rdfs:Proposition.

  type
    mf:PositiveEntailmentTest
  approval
  action
    test001a.ttl
  result
    triple-terms-propositions.ttl
reifies-range: reifies-range

  Range of rdf:reifies is rdfs:Proposition.

  type
    mf:PositiveEntailmentTest
  approval
  action
    reifies-rangea.ttl
  result
    reifies-ranger.ttl