jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1402708 - in /jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql: TC_General.java TC_Scripted.java syntax/TS_Serialization.java syntax/TestSerialization.java
Date Fri, 26 Oct 2012 22:37:05 GMT
Author: andy
Date: Fri Oct 26 22:37:04 2012
New Revision: 1402708

URL: http://svn.apache.org/viewvc?rev=1402708&view=rev
Log:
Add some OpAsQuery tests ; find some tests not being run in the full test suite and put them
back.

Modified:
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_General.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_Scripted.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_General.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_General.java?rev=1402708&r1=1402707&r2=1402708&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_General.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_General.java Fri Oct 26 22:37:04
2012
@@ -60,7 +60,6 @@ import com.hp.hpl.jena.sparql.util.TS_Ut
     TS_Algebra.class ,
     TS_ResultSet.class ,
     TS_Serialization.class ,
-    
     TS_API.class ,
     TS_Core.class ,
     TS_Path.class ,

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_Scripted.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_Scripted.java?rev=1402708&r1=1402707&r2=1402708&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_Scripted.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/TC_Scripted.java Fri Oct 26 22:37:04
2012
@@ -31,6 +31,7 @@ public class TC_Scripted extends TestSui
         TestSuite ts = new TC_Scripted() ;
         ts.addTest(ScriptTestSuiteFactory.make(ARQTestSuite.testDirARQ+"/manifest-arq.ttl"))
;
         ts.addTest(ScriptTestSuiteFactory.make(ARQTestSuite.testDirARQ+"/Syntax/manifest-syntax.ttl"))
;
+        ts.addTest(ScriptTestSuiteFactory.make(ARQTestSuite.testDirARQ+"/Serialization/manifest.ttl"))
;
         return ts ;
     }
     

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java?rev=1402708&r1=1402707&r2=1402708&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java
Fri Oct 26 22:37:04 2012
@@ -23,20 +23,10 @@ import org.junit.runner.RunWith ;
 import org.junit.runners.Suite ;
 import org.junit.runners.Suite.SuiteClasses ;
 
-import com.hp.hpl.jena.sparql.ARQTestSuite ;
-import com.hp.hpl.jena.sparql.expr.E_Function;
-import com.hp.hpl.jena.sparql.junit.ScriptTestSuiteFactory ;
-
 @RunWith(Suite.class)
-@SuiteClasses( { 
+@SuiteClasses( {
     TestSerialization.class
 })
 public class TS_Serialization extends TestSuite
 {
-    // See also TestSerialization for some low level tests (not scripted)
-    static public TestSuite suite()
-    {
-    	E_Function.WarnOnUnknownFunction = false ;
-        return ScriptTestSuiteFactory.make(ARQTestSuite.testDirARQ+"/Serialization/manifest.ttl")
;
-    }
 }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java?rev=1402708&r1=1402707&r2=1402708&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
Fri Oct 26 22:37:04 2012
@@ -47,7 +47,7 @@ public class TestSerialization extends T
 //        return ts ;
 //    }
     
-    PrefixMapping pmap1 = new PrefixMappingImpl() ;
+    static PrefixMapping pmap1 = new PrefixMappingImpl() ;
     {
         pmap1.setNsPrefix("", "http://default/") ;
         pmap1.setNsPrefix("ex", "http://example/x#") ;
@@ -191,35 +191,47 @@ public class TestSerialization extends T
            false) ;
     }
     
-    @Test public void testOpToSyntax_1()
+    @Test public void testOpToSyntax_01()
     {
         testOpToSyntax("(bgp (triple ?s ?p ?o))", "SELECT * {?s ?p ?o}") ;
     }
     
-    @Test public void testOpToSyntax_2()
+    @Test public void testOpToSyntax_02()
     {
         testOpToSyntax("(bgp (triple ?s ?p ?o) (<urn:x> <urn:p> <urn:z>)
)", 
                        "SELECT * {?s ?p ?o . <urn:x> <urn:p> <urn:z> }")
;
     }
 
-    @Test public void testOpToSyntax_3()
+    @Test public void testOpToSyntax_03()
     {
         testOpToSyntax("(table unit)", 
                        "SELECT * {}") ;
     }
 
-    @Test public void testOpToSyntax_4()
+    @Test public void testOpToSyntax_04()
     {
         testOpToSyntax("(leftjoin (bgp (triple ?s ?p ?o)) (bgp (triple ?a ?b ?c)))",
                        "SELECT * { ?s ?p ?o OPTIONAL { ?a ?b ?c }}") ;
     }
 
-    @Test public void testOpToSyntax_5()
+    @Test public void testOpToSyntax_05()
     {
         testOpToSyntax("(leftjoin (bgp (triple ?s ?p ?o)) (bgp (triple ?a ?b ?c)) (> ?z
5))",
                        "SELECT * { ?s ?p ?o OPTIONAL { ?a ?b ?c FILTER(?z > 5) }}") ;
     }
     
+    @Test public void testOpToSyntax_06()
+    {
+        testOpToSyntax("(path ?s (path* <urn:p>) ?o)",
+                       "SELECT * { ?s <urn:p>* ?o }") ;
+    }
+    
+    @Test public void testOpToSyntax_07()
+    {
+        testOpToSyntax("(path ?s (path? (alt (path+ <urn:p1>) <urn:p2>)) ?o)"
,
+                       "SELECT * { ?s (<urn:p1>+|<urn:p2>)? ?o }") ;
+    }
+
     private void testOpToSyntax(String opStr, String queryString)
     {
         Op op = SSE.parseOp(opStr) ;



Mime
View raw message