[Mulgara-svn] r882 - trunk/src/jar/query/java/org/mulgara/query/filter
pag at mulgara.org
pag at mulgara.org
Thu May 1 17:51:40 UTC 2008
Author: pag
Date: 2008-05-01 10:51:40 -0700 (Thu, 01 May 2008)
New Revision: 882
Modified:
trunk/src/jar/query/java/org/mulgara/query/filter/BinaryComparisonUnitTest.java
Log:
Updated to use the XSD datatype values and introduced a test for general XSD types that was passing when it should have failed
Modified: trunk/src/jar/query/java/org/mulgara/query/filter/BinaryComparisonUnitTest.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/query/filter/BinaryComparisonUnitTest.java 2008-05-01 17:48:38 UTC (rev 881)
+++ trunk/src/jar/query/java/org/mulgara/query/filter/BinaryComparisonUnitTest.java 2008-05-01 17:51:40 UTC (rev 882)
@@ -29,7 +29,7 @@
import org.mulgara.query.filter.value.TypedLiteral;
import org.mulgara.query.filter.value.Var;
-import static org.mulgara.query.filter.value.TypedLiteral.XSD_NS;
+import static org.mulgara.query.rdf.XSD.*;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -46,10 +46,10 @@
*/
public class BinaryComparisonUnitTest extends TestCase {
- protected URI xsdInt = URI.create(XSD_NS + "int");
- protected URI xsdFloat = URI.create(XSD_NS + "float");
- protected URI xsdString = URI.create(XSD_NS + "string");
- protected URI xsdDate = URI.create(XSD_NS + "dateTime");
+ protected URI xsdInt = INT_URI;
+ protected URI xsdFloat = FLOAT_URI;
+ protected URI xsdString = STRING_URI;
+ protected URI xsdDate = DATE_TIME_URI;
Bool t = Bool.TRUE;
Bool f = Bool.FALSE;
@@ -300,6 +300,7 @@
Literal foo = new LiteralImpl("foo", xsdString);
Literal litTrue = new LiteralImpl("true", t.getType().getValue());
Literal now = new LiteralImpl("2008-04-16T21:57:00Z", xsdDate);
+ Literal nowDt = new LiteralImpl("2008-04-16T21:57:00Z", DATE_URI);
URIReferenceImpl intRef = new URIReferenceImpl(xsdInt);
BlankNodeImpl bn = new BlankNodeImpl(101);
Node[][] rows = {
@@ -321,8 +322,9 @@
new Node[] {simpleFooEn, now},
new Node[] {foo, litTrue},
new Node[] {foo, now}, // 17
+ new Node[] {foo, nowDt},
new Node[] {litTrue, now},
- new Node[] {seven, intRef}, //19
+ new Node[] {seven, intRef}, // 20
new Node[] {sevenF, intRef},
new Node[] {simpleFoo, intRef},
new Node[] {simpleFooEn, intRef},
More information about the Mulgara-svn
mailing list