Modified: incubator/pig/branches/types/test/org/apache/pig/test/utils/LogicalPlanTester.java URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/utils/LogicalPlanTester.java?rev=701235&r1=701234&r2=701235&view=diff ============================================================================== --- incubator/pig/branches/types/test/org/apache/pig/test/utils/LogicalPlanTester.java (original) +++ incubator/pig/branches/types/test/org/apache/pig/test/utils/LogicalPlanTester.java Thu Oct 2 13:36:49 2008 @@ -176,6 +176,16 @@ } + public void printPlan(LogicalPlan lp, String title) { + try { + System.err.println(title); + LOPrinter lv = new LOPrinter(System.err, lp); + lv.visit(); + System.err.println(); + } catch (Exception e) { + } + } + ////////////// Helpers //////////////// // The actual plan builder
Modified: incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java?rev=701235&r1=701234&r2=701235&view=diff ============================================================================== --- incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java (original) +++ incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java Thu Oct 2 13:36:49 2008 @@ -95,4 +95,16 @@ } } + public static String getCurrentMethodName() { + StackTraceElement e[] = Thread.currentThread().getStackTrace() ; + boolean doNext = false; + for (StackTraceElement s : e) { + if (doNext) { + return s.getMethodName(); + } + doNext = s.getMethodName().equals("getCurrentMethodName"); + } + return null; + } + }