From b1c09a1476e6ed5cedf7713f48d832b849675278 Mon Sep 17 00:00:00 2001 From: chibash Date: Thu, 12 May 2022 00:50:44 +0900 Subject: fixs a compilation problem although one test still fails. --- src/test/javassist/JvstTest.java | 1 + .../javassist/bytecode/SignatureAttributeTest.java | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/test/javassist/JvstTest.java b/src/test/javassist/JvstTest.java index 47a61083..3ed16827 100644 --- a/src/test/javassist/JvstTest.java +++ b/src/test/javassist/JvstTest.java @@ -1181,6 +1181,7 @@ public class JvstTest extends JvstTestRoot { suite.addTestSuite(test.javassist.convert.ArrayAccessReplaceTest.class); suite.addTestSuite(test.javassist.convert.ArrayAccessReplaceTest2.class); suite.addTestSuite(test.javassist.bytecode.analysis.DomTreeTest.class); + suite.addTestSuite(javassist.bytecode.SignatureAttributeTest.class); return suite; } } diff --git a/src/test/javassist/bytecode/SignatureAttributeTest.java b/src/test/javassist/bytecode/SignatureAttributeTest.java index 1bf654d4..aac33f21 100644 --- a/src/test/javassist/bytecode/SignatureAttributeTest.java +++ b/src/test/javassist/bytecode/SignatureAttributeTest.java @@ -1,11 +1,10 @@ package javassist.bytecode; -import static org.junit.Assert.assertEquals; - +import junit.framework.TestCase; import java.util.HashMap; -public class SignatureAttributeTest { - void test1() { +public class SignatureAttributeTest extends TestCase { + public void test1() { final String signature = "TX;TY;La/b/C$D$E$J$K;"; //a sequence of three ReferenceTypeSignature final HashMap map = new HashMap<>(); map.put("a/b/C$D$E$J$K", "o/p/Q$R$S$T$U"); @@ -13,8 +12,8 @@ public class SignatureAttributeTest { final String signatureRenamed = SignatureAttribute.renameClass(signature, map); assertEquals("TX;TY;Lo/p/Q$R$S$T$U;", signatureRenamed); } - - void test2() { + + public void test2() { final String signature = "La/b/C.D;"; //a ClassTypeSignature final HashMap map = new HashMap<>(); map.put("a/b/C$D", "o/p/Q$R"); @@ -23,7 +22,7 @@ public class SignatureAttributeTest { assertEquals("Lo/p/Q.R;", signatureRenamed); } - void test3() { + public void test3() { final String signature = "BJLB.F;TZ;"; //a sequence of four JavaTypeSignature final HashMap map = new HashMap<>(); map.put("B$F", "P$T"); @@ -32,7 +31,7 @@ public class SignatureAttributeTest { assertEquals("BJLP.T;TZ;", signatureRenamed); } - void test4() { + public void test4() { final String signature = "La/b/C;[[Ld/E<+TY;-Ljava/lang/Object;*>;Z"; //a sequence of three JavaTypeSignature final HashMap map = new HashMap<>(); map.put("java/lang/Object", "java/util/Map"); @@ -41,7 +40,7 @@ public class SignatureAttributeTest { assertEquals("La/b/C;[[LF<+TY;-Ljava/util/Map;*>;Z", signatureRenamed); } - void test5() { + public void test5() { final String signature = "La/b/C$D$E.H$I;>.J$K;"; //a ClassTypeSignature final HashMap map = new HashMap<>(); map.put("a/b/C$D$E$J$K", "o/p/Q$R$S$T$U"); @@ -50,7 +49,7 @@ public class SignatureAttributeTest { assertEquals("Lo/p/Q$R$S.Y$Z;>.T$U;", signatureRenamed); } - void test6() { + public void test6() { final String signature = ".D;:Le/F$G;>Lh/I$J;"; //a ClassSignature final HashMap map = new HashMap<>(); map.put("a/B$C$D", "o/P$Q$R"); @@ -60,7 +59,7 @@ public class SignatureAttributeTest { assertEquals(".R;:Ls/T$U;>Lv/W$X;", signatureRenamed); } - void test7() { + public void test7() { final String signature = ".F;:TZ;B:Ljava/lang/Thread;>(LX;TA;LA;)V^Ljava/lang/Exception;"; //a MethodSignature final HashMap map = new HashMap<>(); map.put("A", "P"); -- cgit v1.2.3