jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1476200 - in /jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra: OpAsQueryTest.java TS_Algebra.java TestOpAsQuery.java
Date Fri, 26 Apr 2013 13:44:53 GMT
Author: andy
Date: Fri Apr 26 13:44:52 2013
New Revision: 1476200

URL: http://svn.apache.org/r1476200
Log:
Add tests for mixtures of path expressions and tripel patterns.
Rename to follow the Test* convention to make it findable by IDE completion.

Added:
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestOpAsQuery.java
      - copied, changed from r1471133, jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/OpAsQueryTest.java
Removed:
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/OpAsQueryTest.java
Modified:
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TS_Algebra.java

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TS_Algebra.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TS_Algebra.java?rev=1476200&r1=1476199&r2=1476200&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TS_Algebra.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TS_Algebra.java Fri Apr
26 13:44:52 2013
@@ -44,7 +44,7 @@ import org.junit.runners.Suite ;
 //    , TestUnionGraph.class
 //    , TestUnionTransformTriples.class
 //    , TestUnionTransformQuads.class
-    , OpAsQueryTest.class
+    , TestOpAsQuery.class
 })
 
 public class TS_Algebra extends TestSuite

Copied: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestOpAsQuery.java
(from r1471133, jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/OpAsQueryTest.java)
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestOpAsQuery.java?p2=jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestOpAsQuery.java&p1=jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/OpAsQueryTest.java&r1=1471133&r2=1476200&rev=1476200&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/OpAsQueryTest.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestOpAsQuery.java Fri
Apr 26 13:44:52 2013
@@ -32,7 +32,7 @@ import static org.junit.Assert.*;
 /**
  * Tests for {@link OpAsQuery}
  */
-public class OpAsQueryTest {
+public class TestOpAsQuery {
 
     /**
      * Test of asQuery method, of class OpAsQuery.
@@ -222,7 +222,21 @@ public class OpAsQueryTest {
         String query = "SELECT * WHERE { { SELECT ?key (COUNT(*) AS ?agg) { ?key ?p ?o }
GROUP BY ?key } }";
         checkQueryParseable(query, false);
     }
+    
+    @Test
+    public void testPathExpressions1() {
+        // test that the query after serialization is legal (as much a test of the serializer
as way OpAsQuery works)
+        String query = "PREFIX : <http://example/> SELECT * { ?s :p* ?o . ?x :r 123
. }" ;
+        Query r[] = checkQueryParseable(query, false);
+    }
         
+    @Test
+    public void testPathExpressions2() {
+        // test that the query  
+        String query = "PREFIX : <http://example/> SELECT * { ?s :p*/:q ?o . ?x :r
123 . }" ;
+        Query r[] = checkQueryParseable(query, false);
+    }
+
     public Query[] checkQuery(String query) {
         Query orig = QueryFactory.create(query, Syntax.syntaxSPARQL_11);
         Op toReconstruct = Algebra.compile(orig);



Mime
View raw message