jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/5] jena git commit: Specific debugging code.
Date Sun, 17 Apr 2016 12:15:03 GMT
Specific debugging code.

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

Branch: refs/heads/master
Commit: d29f93d0b8be23d5d344ec8f7da0cdb7ffb487e2
Parents: 62ff5ca
Author: Andy Seaborne <andy@apache.org>
Authored: Sun Apr 17 13:05:57 2016 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Sun Apr 17 13:05:57 2016 +0100

----------------------------------------------------------------------
 .../algebra/optimize/AbstractTestTransform.java      | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/d29f93d0/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/AbstractTestTransform.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/AbstractTestTransform.java
b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/AbstractTestTransform.java
index fcc58fa..4f63abc 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/AbstractTestTransform.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/optimize/AbstractTestTransform.java
@@ -18,6 +18,8 @@
 
 package org.apache.jena.sparql.algebra.optimize ;
 
+import java.util.Objects ;
+
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.apache.jena.atlas.lib.StrUtils ;
 import org.apache.jena.query.Query ;
@@ -73,6 +75,19 @@ public abstract class AbstractTestTransform extends BaseTest {
     private static void check(Op opToOptimize, String opExpectedString) {
         Op opOptimize = Algebra.optimize(opToOptimize) ;
         Op opExpected = SSE.parseOp(opExpectedString) ;
+        if ( false ) {
+            // Hook for more detail during development. 
+            boolean b = Objects.equals(opExpected, opOptimize) ;
+            if ( ! b ) {
+                System.err.println("** Input:");
+                System.err.print(opToOptimize) ;
+                System.err.println("** Expected:");
+                System.err.print(opExpected) ;
+                System.err.println("** Actual:");
+                System.err.print(opOptimize) ;
+                System.err.println("-------------------") ;
+            }
+        }
         assertEquals(opExpected, opOptimize) ;
     }
 


Mime
View raw message