- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Thu, 24 Aug 2006 21:45:33 +0100
- To: 'RDF Data Access Working Group' <public-rdf-dawg@w3.org>
"""
ACTION AndyS:
Write some tests for value testing (unknown types and extensibility) to add to
2006/JulSep0086
"""
http://lists.w3.org/Archives/Public/public-rdf-dawg/2006JulSep/0086
http://lists.w3.org/Archives/Public/public-rdf-dawg/2006AprJun/0104
I added some tests and sorted out the existing ones. They are split into sets
so can be considered separately if desired.
http://www.w3.org/2001/sw/DataAccess/tests/data/OpenWorld/
Tests open-eq-01 to open-eq-06 are the original ones from 2006AprJun/0104,
renamed.
Tests open-eq-07 to open-eq-10 work by taking a list of all possible term
forms, forming the cross product and seeing which are value-equal and
value-not-equal. This is done for data which contains the same compared
values and different by comparable values. These tests are exhaustive and
include literals with lang tags - because lang tags are not case sensitive
(nor is there a canonical form according to RFC3066) it seemed reasonable to
be able equate "xyz"@EN with "xyz"@en. In effect, each lang tag defines a
separate value space - can't compare or test for equality across them, but you
can with the same language.
"abc"@en = "abc"@EN
"xyz"@en > "abc"@en
"xyz"@en > "abc"@EN
Tests open-eq-11.rq and open-eq-12.rq look for pairs of terms that can be
compared and pairs that can't.
Tests open-cmp-01, open-cmp-02 look for pairs that can be compared, not just
test for equality. open-cmp-02 uses "<=" which can be implemented so that
things can pass <= even if they are not comparable because they are unknown
but pass equality test by sameTerm => sameValue.
These test work on pairs of literals in the data - if open-eq-07/10 are too
coarse grained, they could be broken up into this style. I just wrote the
paired data later, but left the exhaustive approach of the earlier tests.
(sameTerm seems a slightly better name than sameNode because "RDF term" is
phrase used in SPARQL and because predicates aren't nodes in the graph-sense).
No sameTerm tests yet because they can't be written yet in pure SPARQL.
[[
aside: I realised that testing for plain literals vs xsd:string can be done
even if datatype("plain string") is xsd:string by a different route:
sameTerm(?x, str(?x))
and this is the defining characteristic of plain literals.
]]
Tests date-1 to date-4 are some tests involving an extension type (xsd:date)
including sorting.
Andy
Received on Thursday, 24 August 2006 20:46:20 UTC