Skip to content

Commit c959c3f

Browse files
Tests get_outer_class with deeply nested classes.
1 parent 8201c19 commit c959c3f

21 files changed

+299
-14
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

jbmc/unit/java_bytecode/java_bytecode_parser/InnerClasses.java

+66
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,72 @@ private PrivateDoublyNestedInnerClass(int i) {
8585
}
8686
}
8787

88+
class InnerPrivateClassesDeeplyNested {
89+
private class SinglyNestedPrivateClass {
90+
int i;
91+
SinglyNestedPrivateClass(int i) {
92+
this.i = i;
93+
}
94+
public class PublicDoublyNestedInnerClass {
95+
public int i;
96+
public PublicDoublyNestedInnerClass(int i) {
97+
this.i = i;
98+
}
99+
}
100+
class DefaultDoublyNestedInnerClass {
101+
int i;
102+
DefaultDoublyNestedInnerClass(int i) {
103+
this.i = i;
104+
}
105+
}
106+
protected class ProtectedDoublyNestedInnerClass {
107+
protected int i;
108+
protected ProtectedDoublyNestedInnerClass(int i) {
109+
this.i = i;
110+
}
111+
}
112+
private class PrivateDoublyNestedInnerClass {
113+
private int i;
114+
private PrivateDoublyNestedInnerClass(int i) {
115+
this.i = i;
116+
}
117+
}
118+
}
119+
}
120+
121+
class OuterClassMostRestrictiveDeeplyNested {
122+
public class SinglyNestedPublicClass {
123+
int i;
124+
SinglyNestedPublicClass(int i) {
125+
this.i = i;
126+
}
127+
public class PublicDoublyNestedInnerClass {
128+
public int i;
129+
public PublicDoublyNestedInnerClass(int i) {
130+
this.i = i;
131+
}
132+
}
133+
class DefaultDoublyNestedInnerClass {
134+
int i;
135+
DefaultDoublyNestedInnerClass(int i) {
136+
this.i = i;
137+
}
138+
}
139+
protected class ProtectedDoublyNestedInnerClass {
140+
protected int i;
141+
protected ProtectedDoublyNestedInnerClass(int i) {
142+
this.i = i;
143+
}
144+
}
145+
private class PrivateDoublyNestedInnerClass {
146+
private int i;
147+
private PrivateDoublyNestedInnerClass(int i) {
148+
this.i = i;
149+
}
150+
}
151+
}
152+
}
153+
88154
class ContainsAnonymousClass {
89155
interface InnerInterface {
90156
int i = 0;
Binary file not shown.

0 commit comments

Comments
 (0)