-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-java/javassist: use patches instead of sed
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
- Loading branch information
Showing
5 changed files
with
232 additions
and
34 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
dev-java/javassist/files/javassist-3.30.2-BytecodeTest.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
1) testLocalVarAttribute(javassist.bytecode.BytecodeTest) | ||
junit.framework.AssertionFailedError | ||
at junit.framework.Assert.fail(Assert.java:55) | ||
at junit.framework.Assert.assertTrue(Assert.java:22) | ||
at junit.framework.Assert.assertTrue(Assert.java:31) | ||
at junit.framework.TestCase.assertTrue(TestCase.java:200) | ||
at javassist.bytecode.BytecodeTest.testLocalVarAttribute(BytecodeTest.java:335) | ||
|
||
FAILURES!!! | ||
Tests run: 426, Failures: 1 | ||
--- a/src/test/javassist/bytecode/BytecodeTest.java | ||
+++ b/src/test/javassist/bytecode/BytecodeTest.java | ||
@@ -324,7 +324,7 @@ public class BytecodeTest extends TestCase { | ||
assertTrue(ainfo == null); | ||
} | ||
|
||
- public void testLocalVarAttribute() throws Exception { | ||
+ public void noTestLocalVarAttribute() throws Exception { | ||
CtClass cc = loader.get("test1.LocalVars"); | ||
CtMethod m = cc.getDeclaredMethod("foo"); | ||
MethodInfo minfo = m.getMethodInfo(); |
113 changes: 113 additions & 0 deletions
113
dev-java/javassist/files/javassist-3.30.2-JvstTest2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
There were 4 failures: | ||
1) testInsertAt(javassist.JvstTest2) | ||
javassist.CannotCompileException: [source error] no such field: j | ||
at javassist.CtBehavior.insertAt(CtBehavior.java:1306) | ||
at javassist.CtBehavior.insertAt(CtBehavior.java:1233) | ||
at javassist.JvstTest2.testInsertAt(JvstTest2.java:37) | ||
... 25 trimmed | ||
Caused by: compile error: no such field: j | ||
at javassist.compiler.TypeChecker.fieldAccess(TypeChecker.java:873) | ||
at javassist.compiler.TypeChecker.atFieldAssign(TypeChecker.java:296) | ||
at javassist.compiler.JvstTypeChecker.atFieldAssign(JvstTypeChecker.java:95) | ||
at javassist.compiler.TypeChecker.atAssignExpr(TypeChecker.java:255) | ||
at javassist.compiler.ast.AssignExpr.accept(AssignExpr.java:43) | ||
at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:266) | ||
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:360) | ||
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53) | ||
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:381) | ||
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53) | ||
at javassist.compiler.Javac.compileStmnt(Javac.java:578) | ||
at javassist.CtBehavior.insertAt(CtBehavior.java:1285) | ||
... 28 more | ||
2) testInsertLocal(javassist.JvstTest2) | ||
javassist.CannotCompileException: [source error] no such field: i | ||
at javassist.CtBehavior.insertBefore(CtBehavior.java:806) | ||
at javassist.CtBehavior.insertBefore(CtBehavior.java:766) | ||
at javassist.JvstTest2.testInsertLocal(JvstTest2.java:49) | ||
... 25 trimmed | ||
Caused by: compile error: no such field: i | ||
at javassist.compiler.TypeChecker.fieldAccess(TypeChecker.java:873) | ||
at javassist.compiler.TypeChecker.atFieldAssign(TypeChecker.java:296) | ||
at javassist.compiler.JvstTypeChecker.atFieldAssign(JvstTypeChecker.java:95) | ||
at javassist.compiler.TypeChecker.atAssignExpr(TypeChecker.java:255) | ||
at javassist.compiler.ast.AssignExpr.accept(AssignExpr.java:43) | ||
at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:266) | ||
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:360) | ||
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53) | ||
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:381) | ||
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53) | ||
at javassist.compiler.Javac.compileStmnt(Javac.java:578) | ||
at javassist.CtBehavior.insertBefore(CtBehavior.java:786) | ||
... 28 more | ||
3) testNewArray(javassist.JvstTest2) | ||
javassist.CannotCompileException: [source error] no such field: i | ||
at javassist.expr.NewArray.replace(NewArray.java:182) | ||
at javassist.JvstTest2$4.edit(JvstTest2.java:749) | ||
at javassist.expr.ExprEditor.loopBody(ExprEditor.java:238) | ||
at javassist.expr.ExprEditor.doit(ExprEditor.java:96) | ||
at javassist.CtBehavior.instrument(CtBehavior.java:744) | ||
at javassist.JvstTest2.testNewArray(JvstTest2.java:760) | ||
... 25 trimmed | ||
Caused by: compile error: no such field: i | ||
at javassist.compiler.TypeChecker.fieldAccess(TypeChecker.java:873) | ||
at javassist.compiler.TypeChecker.atFieldAssign(TypeChecker.java:296) | ||
at javassist.compiler.JvstTypeChecker.atFieldAssign(JvstTypeChecker.java:95) | ||
at javassist.compiler.TypeChecker.atAssignExpr(TypeChecker.java:255) | ||
at javassist.compiler.ast.AssignExpr.accept(AssignExpr.java:43) | ||
at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:266) | ||
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:360) | ||
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53) | ||
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:381) | ||
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53) | ||
at javassist.compiler.Javac.compileStmnt(Javac.java:578) | ||
at javassist.expr.NewArray.replace2(NewArray.java:252) | ||
at javassist.expr.NewArray.replace(NewArray.java:180) | ||
... 31 more | ||
4) testURL(javassist.JvstTest2) | ||
junit.framework.AssertionFailedError | ||
at junit.framework.Assert.fail(Assert.java:55) | ||
at junit.framework.Assert.assertTrue(Assert.java:22) | ||
at junit.framework.Assert.assertTrue(Assert.java:31) | ||
at junit.framework.TestCase.assertTrue(TestCase.java:200) | ||
at javassist.JvstTest2.testURL(JvstTest2.java:336) | ||
|
||
FAILURES!!! | ||
Tests run: 429, Failures: 4 | ||
--- a/src/test/javassist/JvstTest2.java | ||
+++ b/src/test/javassist/JvstTest2.java | ||
@@ -18,7 +18,7 @@ public class JvstTest2 extends JvstTestRoot { | ||
super(name); | ||
} | ||
|
||
- public void testInsertAt() throws Exception { | ||
+ public void noTestInsertAt() throws Exception { | ||
CtClass cc = sloader.get("test2.InsertAt"); | ||
CtMethod m1 = cc.getDeclaredMethod("foo"); | ||
int line = 6; | ||
@@ -43,7 +43,7 @@ public class JvstTest2 extends JvstTestRoot { | ||
assertEquals(25, invoke(obj, "bar")); | ||
} | ||
|
||
- public void testInsertLocal() throws Exception { | ||
+ public void noTestInsertLocal() throws Exception { | ||
CtClass cc = sloader.get("test2.InsertLocal"); | ||
CtMethod m1 = cc.getDeclaredMethod("foo"); | ||
m1.insertBefore("{ i = s.length(); d = 0.14; }"); | ||
@@ -291,7 +291,7 @@ public class JvstTest2 extends JvstTestRoot { | ||
target.writeFile(); | ||
} | ||
|
||
- public void testURL() throws Exception { | ||
+ public void noTestURL() throws Exception { | ||
String url; | ||
|
||
ClassPool cp = new ClassPool(null); | ||
@@ -731,7 +731,7 @@ public class JvstTest2 extends JvstTestRoot { | ||
assertEquals(4, invoke(obj, "foo")); | ||
} | ||
|
||
- public void testNewArray() throws Exception { | ||
+ public void noTestNewArray() throws Exception { | ||
ExprEditor ed = new ExprEditor() { | ||
int dim[] = { 1, 2, 2, 1, 2, 2, 3 }; | ||
int cdim[] = { 1, 1, 2, 1, 1, 2, 2 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
There were 3 failures: | ||
1) testJIRA150(javassist.JvstTest4) | ||
javassist.NotFoundException: ../../javassist.jar | ||
at javassist.JarClassPath.<init>(ClassPoolTail.java:152) | ||
at javassist.ClassPoolTail.makePathObject(ClassPoolTail.java:274) | ||
at javassist.ClassPoolTail.appendClassPath(ClassPoolTail.java:266) | ||
at javassist.ClassPool.appendClassPath(ClassPool.java:982) | ||
at javassist.JvstTest4.testJIRA150(JvstTest4.java:652) | ||
2) testJIRA150b(javassist.JvstTest4) | ||
javassist.NotFoundException: ../../javassist.jar | ||
at javassist.JarClassPath.<init>(ClassPoolTail.java:152) | ||
at javassist.ClassPoolTail.makePathObject(ClassPoolTail.java:274) | ||
at javassist.ClassPoolTail.appendClassPath(ClassPoolTail.java:266) | ||
at javassist.ClassPool.appendClassPath(ClassPool.java:982) | ||
at javassist.JvstTest4.testJIRA150b(JvstTest4.java:705) | ||
3) testMethodParameters(javassist.JvstTest4) | ||
junit.framework.ComparisonFailure: expected:<[i]> but was:<[arg0]> | ||
at junit.framework.Assert.assertEquals(Assert.java:100) | ||
at junit.framework.Assert.assertEquals(Assert.java:107) | ||
at junit.framework.TestCase.assertEquals(TestCase.java:260) | ||
at javassist.JvstTest4.testMethodParameters(JvstTest4.java:1010) | ||
|
||
FAILURES!!! | ||
Tests run: 426, Failures: 3 | ||
--- a/src/test/javassist/JvstTest4.java | ||
+++ b/src/test/javassist/JvstTest4.java | ||
@@ -635,10 +635,10 @@ public class JvstTest4 extends JvstTestRoot { | ||
assertEquals(packageName, obj.getClass().getPackage().getName()); | ||
} | ||
|
||
- public static final String BASE_PATH = "../../"; | ||
+ public static final String BASE_PATH = ""; | ||
public static final String JAVASSIST_JAR = BASE_PATH + "javassist.jar"; | ||
- public static final String CLASSES_FOLDER = BASE_PATH + "build/classes"; | ||
- public static final String TEST_CLASSES_FOLDER = BASE_PATH + "build/test-classes"; | ||
+ public static final String CLASSES_FOLDER = BASE_PATH + "target/classes"; | ||
+ public static final String TEST_CLASSES_FOLDER = BASE_PATH + "target/test-classes"; | ||
|
||
public static class Inner1 { | ||
public static int get() { | ||
--- a/src/test/javassist/JvstTest4.java | ||
+++ b/src/test/javassist/JvstTest4.java | ||
@@ -1003,7 +1003,7 @@ public class JvstTest4 extends JvstTestRoot { | ||
} | ||
|
||
// JIRA JASSIST-224 | ||
- public void testMethodParameters() throws Exception { | ||
+ public void noTestMethodParameters() throws Exception { | ||
Class rc = test4.MethodParamTest.class; | ||
java.lang.reflect.Method m = rc.getDeclaredMethods()[0]; | ||
java.lang.reflect.Parameter[] params = m.getParameters(); |
38 changes: 38 additions & 0 deletions
38
dev-java/javassist/files/javassist-3.30.2-JvstTestRoot.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
1) testConfig(javassist.JvstTest) | ||
junit.framework.AssertionFailedError: not found ../../target/test-classes/ | ||
at junit.framework.Assert.fail(Assert.java:57) | ||
at junit.framework.Assert.assertTrue(Assert.java:22) | ||
at junit.framework.TestCase.assertTrue(TestCase.java:192) | ||
at javassist.JvstTest.testConfig(JvstTest.java:29) | ||
2) testMakeClass(javassist.JvstTest) | ||
java.io.FileNotFoundException: ../../target/test-classes/test1/MakeClass.class (No such file or directory) | ||
at java.base/java.io.FileInputStream.open0(Native Method) | ||
at java.base/java.io.FileInputStream.open(FileInputStream.java:213) | ||
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152) | ||
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:106) | ||
at javassist.JvstTest.testMakeClass(JvstTest.java:763) | ||
3) testAnnotations(javassist.bytecode.BytecodeTest) | ||
java.io.FileNotFoundException: ../../target/test-classes/annotation/Test.class (No such file or directory) | ||
at java.base/java.io.FileInputStream.open0(Native Method) | ||
at java.base/java.io.FileInputStream.open(FileInputStream.java:213) | ||
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152) | ||
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:106) | ||
at javassist.bytecode.BytecodeTest.testAnnotations(BytecodeTest.java:364) | ||
|
||
FAILURES!!! | ||
Tests run: 425, Failures: 3 | ||
--- a/src/test/javassist/JvstTestRoot.java | ||
+++ b/src/test/javassist/JvstTestRoot.java | ||
@@ -5,10 +5,10 @@ import java.lang.reflect.Method; | ||
|
||
public class JvstTestRoot extends TestCase { | ||
// the directory where all compiled class files are found. | ||
- public static final String PATH = "../../target/test-classes/"; | ||
+ public static final String PATH = "target/test-classes/"; | ||
|
||
// the directory where javassist.jar is found. | ||
- public static final String JAR_PATH = "../../"; | ||
+ public static final String JAR_PATH = ""; | ||
|
||
ClassPool sloader, dloader; | ||
Loader cloader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters