You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/05/21 18:54:37 UTC
[17/23] jena git commit: Correct tests in the light of deep walking
abnd transformation.
Correct tests in the light of deep walking abnd transformation.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/41f6e1ab
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/41f6e1ab
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/41f6e1ab
Branch: refs/heads/master
Commit: 41f6e1ab317b6ffdb0997cc1f3b17ced6c10827a
Parents: 10dbcf9
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Apr 25 18:38:01 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat May 21 18:29:13 2016 +0100
----------------------------------------------------------------------
.../TestTransformEliminateAssignments.java | 79 +++++++++++++-------
1 file changed, 53 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/41f6e1ab/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/TestTransformEliminateAssignments.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/TestTransformEliminateAssignments.java b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/TestTransformEliminateAssignments.java
index 2de716c..38b8b82 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/TestTransformEliminateAssignments.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/TestTransformEliminateAssignments.java
@@ -451,32 +451,59 @@ public class TestTransformEliminateAssignments {
//@formatter:on
}
- @Test
- public void ineligible_10() {
- // We can't inline out of an EXISTS since the assignment isn't projected
- // out anyway
- //@formatter:off
- testNoChange("(project (?y)",
- " (filter (exprlist ?x (exists",
- " (extend (?x true)",
- " (table unit))))",
- " (table unit)))");
- //@formatter:on
- }
-
- @Test
- public void ineligible_11() {
- // We can't inline out of an EXISTS since the assignment isn't projected
- // out anyway
- //@formatter:off
- testNoChange("(project (?y)",
- " (filter (exprlist ?x)",
- " (filter (exprlist (exists",
- " (extend (?x true)",
- " (table unit))))",
- " (table unit))))");
- //@formatter:on
- }
+ // Test not correct.
+ // The "(extend (?x ...))" is not used - it does not cause ?x to come out of (exists).
+ // This would be true regardless of the (project) but the current code is only
+ // triggered by (project)
+
+ // OLD - wrong (new walker correctly waks into the exist).
+// @Test
+// public void ineligible_10() {
+// // We can't inline out of an EXISTS since the assignment isn't projected
+// // out anyway
+// //@formatter:off
+// testNoChange("(project (?y)",
+// " (filter (exprlist ?x (exists",
+// " (extend (?x true)",
+// " (table unit))))",
+// " (table unit)))");
+// //@formatter:on
+// }
+
+ // Checks the right output though for the wrong reason.
+// @Test
+// public void eligible_10() {
+// // The "(extend (?x ...)" is not used - it does not com eout of the (exists).
+// // This would be true reagrdless of the (project) but the current code is only
+// // triggered by (project)
+// //@formatter:off
+// test(StrUtils.strjoinNL("(project (?y)",
+// " (filter (exprlist ?x (exists",
+// " (extend (?x true)",
+// " (table unit))))",
+// " (table unit)))"),
+// "(project (?y)",
+// " (filter (exprlist ?x (exists",
+// " (extend (?x true)",
+// " (table unit))))",
+// " (table unit)))");
+// ;
+// //@formatter:on
+// }
+//
+// @Test
+// public void ineligible_11() {
+// // We can't inline out of an EXISTS since the assignment isn't projected
+// // out anyway
+// //@formatter:off
+// testNoChange("(project (?y)",
+// " (filter (exprlist ?x)",
+// " (filter (exprlist (exists",
+// " (extend (?x true)",
+// " (table unit))))",
+// " (table unit))))");
+// //@formatter:on
+// }
@Test
public void ineligible_12() {