You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/09/12 02:38:33 UTC
svn commit: r1702580 -
/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java
Author: sebb
Date: Sat Sep 12 00:38:32 2015
New Revision: 1702580
URL: http://svn.apache.org/r1702580
Log:
Test is not really working
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java?rev=1702580&r1=1702579&r2=1702580&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java Sat Sep 12 00:38:32 2015
@@ -29,13 +29,14 @@ public class BCELifierTestCase {
* TODO: detect if JDK present and skip test if not
*/
@Test
+ @org.junit.Ignore // does not work properly on some systems. Also the output is rather different
public void testJavapCompare() throws Exception {
testClassOnPath("target/test-classes/Java8Example.class");
}
private void testClassOnPath(String javaClass) throws Exception {
// Get javap of the input class
- final String initial = exec(null, "javap", "-p", javaClass);
+ final String initial = exec(null, "javap", "-p", "-c", javaClass);
final File workDir = new File("target");
File infile = new File(javaClass);
@@ -48,7 +49,7 @@ public class BCELifierTestCase {
fos.close();
exec(workDir, "javac", "-cp", "classes", outfile.getName());
exec(workDir, "java", "-cp", ".:classes", outfile.getName().replace(".java", ""));
- final String output = exec(workDir, "javap", "-p", infile.getName());
+ final String output = exec(workDir, "javap", "-p", "-c", infile.getName());
assertEquals(initial, output);
}