Re: Negative tests

On Thu, Dec 15, 2005 at 12:35:01 +0000, Andy Seaborne wrote:
> >Sorry, must have missed that. Id really rather it wasn't done in that way
> >though, as it limits negative tests to sytax only. Having it as a class is
> >OK, but why not a seperate class structure:
> >
> >:test a :QueryTest ;
> >      a :NegativeTest
> >
> > ?
> 
> We can emumerate good/bad as subclasses of QueryTest, SyntaxTest and 
> SerializationTest.

We can. but it seems just as convienient to split it two ways, and it
saves the enumeration. I dont care that much however.
 
> I haven't felt a need for negative query tests so far (got an example?) if 

An example would be

data
:_foo :bar "baz" .

query
SELECT * WHERE { <_:foo> ?a ?b }

result
?a = :bar  ?b = "baz"

A positive test with zero results is equivalent, but I feel the negative
test is a bit more explicit about what feature its testing.

> for no reason that it's negativeness is hard to define.  Negative syntax 
> means syntax error (parsing failure) and corresponds to MalformedQuery.

A negative query test is surely one that fails if the results match.
 
> Managing to return something from a "bad" query (or bad data) isn't wrong 
> because it's out of the scope of SPARQL.  It might be QueryRequestRefused - 
> but QueryRequestRefused can occur for temporary reasons as well - it might 
> be an incomplete result set (started streaming, query had to abort).

Yeah, OK, I'm happy with that.

- Steve

Received on Thursday, 15 December 2005 14:02:41 UTC