jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject [04/50] [abbrv] jena git commit: JENA-881 : Tests related to the original report.
Date Tue, 17 Feb 2015 12:42:13 GMT
JENA-881 : Tests related to the original report.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/da06f269
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/da06f269
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/da06f269

Branch: refs/heads/eliminate-assignments
Commit: da06f269a7b8c70dfe094fa79480773f0a6d4cfe
Parents: 491d0f9
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Feb 7 13:02:05 2015 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Feb 7 13:02:05 2015 +0000

----------------------------------------------------------------------
 .../optimize/TestTransformFilterPlacement.java  | 58 +++++++++++++++++++-
 1 file changed, 56 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/da06f269/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilterPlacement.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilterPlacement.java
b/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilterPlacement.java
index 45cb1e1..52b56fd 100644
--- a/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilterPlacement.java
+++ b/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilterPlacement.java
@@ -549,8 +549,62 @@ public class TestTransformFilterPlacement extends BaseTest { //extends
AbstractT
         test("(filter (= ?x 123) (filter (= ?y 456) (bgp (?s ?p ?x) (?s ?p ?y) (?s ?p ?z)
)))" , 
              "(sequence (filter (= ?y 456) (sequence (filter (= ?x 123) (bgp (?s ?p ?x)))
(bgp (?s ?p ?y)))) (bgp (?s ?p ?z)))") ;
     }
-
-    // XXX Table tests.
+    
+    // JENA-881 
+    @Test public void place_filter_03() { 
+        String x1 = StrUtils.strjoinNL
+            ("(filter true"
+            ,"  (union"
+            ,"    (table empty)"
+            ,"    (filter (= ?z 3)"
+            ,"      (table unit))))"
+            ) ;
+        String x2 = StrUtils.strjoinNL
+            ("(union"
+            ,"  (filter true"
+            ,"    (table empty))"
+            ,"  (filter (exprlist true (= ?z 3))"
+            ,"    (table unit)))"
+            ) ;
+        test(x1, x2) ;
+    }
+    // JENA-881 
+    @Test public void place_filter_04() { 
+        String x1 = StrUtils.strjoinNL
+            ("(filter true"
+            ,"  (union"
+            ,"    (filter false"
+            ,"      (table unit))"
+            ,"    (filter (!= ?z 3)"
+            ,"      (table unit))))"
+            ) ;
+        String x2 = StrUtils.strjoinNL
+            ("(union"
+            ,"  (filter (exprlist true false)"
+            ,"    (table unit))"
+            ,"  (filter (exprlist true (!= ?z 3))"
+            ,"    (table unit)))"
+                ) ;
+        test(x1, x2) ;
+    }
+    // JENA-881
+    @Test public void place_filter_05() { 
+        String x1 = StrUtils.strjoinNL
+            ("(filter (= ?z 3)"
+            ,"  (sequence"
+            ,"    (filter (= ?y 3)"
+            ,"      (table unit))"
+            ,"    (bgp (triple ?s ?p ?z))))"
+            ) ; 
+        String x2 = StrUtils.strjoinNL
+            ("(sequence"
+            ,"  (filter (= ?y 3)"
+            ,"    (table unit))"
+            ,"  (filter (= ?z 3)"
+            ,"    (bgp (triple ?s ?p ?z))))"
+            ) ;
+        test(x1, x2) ;
+    }
     
     @Test public void place_union_01() {
         test("(filter (= ?x 123) (union (bgp (?s ?p ?x) (?s ?p ?y)) (bgp (?s ?p ?z)  (?s1
?p1 ?x)) ))",


Mime
View raw message