aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/javassist/JvstTest5.java13
-rw-r--r--src/test/test5/NestHost.java11
-rw-r--r--src/test/test5/NestHost2.java11
3 files changed, 35 insertions, 0 deletions
diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java
index b0cbbcca..ec8ff66a 100644
--- a/src/test/javassist/JvstTest5.java
+++ b/src/test/javassist/JvstTest5.java
@@ -440,4 +440,17 @@ public class JvstTest5 extends JvstTestRoot {
assertTrue(names[0].equals("test5.NestHost$Foo") || names[0].equals("test5.NestHost$Bar"));
assertTrue(names[1].equals("test5.NestHost$Foo") || names[1].equals("test5.NestHost$Bar"));
}
+
+ public void testNestMembersAttributeCopy() throws Exception {
+ CtClass cc = sloader.get("test5.NestHost2");
+ cc.getClassFile().compact();
+ cc.writeFile();
+ make(cc.getName());
+ }
+
+ public void testNestHostAttributeCopy() throws Exception {
+ CtClass cc = sloader.get("test5.NestHost2$Foo");
+ cc.getClassFile().compact();
+ cc.toClass();
+ }
}
diff --git a/src/test/test5/NestHost.java b/src/test/test5/NestHost.java
new file mode 100644
index 00000000..045d9d30
--- /dev/null
+++ b/src/test/test5/NestHost.java
@@ -0,0 +1,11 @@
+package test5;
+
+public class NestHost {
+ private int value;
+ public class Foo {
+ int foo() { return value++; }
+ }
+ public class Bar {
+ int bar() { return value++; }
+ }
+}
diff --git a/src/test/test5/NestHost2.java b/src/test/test5/NestHost2.java
new file mode 100644
index 00000000..571059be
--- /dev/null
+++ b/src/test/test5/NestHost2.java
@@ -0,0 +1,11 @@
+package test5;
+
+public class NestHost2 {
+ private int value;
+ public class Foo {
+ int foo() { return value++; }
+ }
+ public class Bar {
+ int bar() { return value++; }
+ }
+}