@@ -81,18 +81,15 @@ SCENARIO(
81
81
" InnerClassesDefault" , " ./java_bytecode/java_bytecode_parser" );
82
82
WHEN (" Parsing the InnerClasses attribute for a public inner class" )
83
83
{
84
- THEN (
85
- " The inner class should be marked as package-private (default) because "
86
- " its "
87
- " containing class has stricter access " )
84
+ THEN (" The class should be marked as public" )
88
85
{
89
86
const symbolt &class_symbol = new_symbol_table.lookup_ref (
90
87
" java::InnerClassesDefault$PublicInnerClass" );
91
88
const java_class_typet java_class =
92
89
to_java_class_type (class_symbol.type );
93
90
REQUIRE_FALSE (java_class.get_is_anonymous_class ());
94
91
REQUIRE (java_class.get_is_inner_class ());
95
- REQUIRE (java_class.get_access () == ID_default );
92
+ REQUIRE (java_class.get_access () == ID_public );
96
93
}
97
94
}
98
95
WHEN (
@@ -112,17 +109,15 @@ SCENARIO(
112
109
}
113
110
WHEN (" Parsing the InnerClasses attribute for a protected inner class" )
114
111
{
115
- THEN (
116
- " The inner class should be marked as package-private (default) because "
117
- " its containing class has stricter access " )
112
+ THEN (" The class should be marked as protected" )
118
113
{
119
114
const symbolt &class_symbol = new_symbol_table.lookup_ref (
120
115
" java::InnerClassesDefault$ProtectedInnerClass" );
121
116
const java_class_typet java_class =
122
117
to_java_class_type (class_symbol.type );
123
118
REQUIRE_FALSE (java_class.get_is_anonymous_class ());
124
119
REQUIRE (java_class.get_is_inner_class ());
125
- REQUIRE (java_class.get_access () == ID_default );
120
+ REQUIRE (java_class.get_access () == ID_protected );
126
121
}
127
122
}
128
123
WHEN (" Parsing the InnerClasses attribute for a private inner class" )
@@ -150,9 +145,7 @@ SCENARIO(
150
145
" Parsing the InnerClasses attribute for a public doubly-nested inner "
151
146
" class" )
152
147
{
153
- THEN (
154
- " The inner class should be marked as package-private (default) because "
155
- " its containing class has stricter access " )
148
+ THEN (" The class should be marked as public" )
156
149
{
157
150
const symbolt &class_symbol = new_symbol_table.lookup_ref (
158
151
" java::InnerClassesDeeplyNested$SinglyNestedClass$"
@@ -161,7 +154,7 @@ SCENARIO(
161
154
to_java_class_type (class_symbol.type );
162
155
REQUIRE_FALSE (java_class.get_is_anonymous_class ());
163
156
REQUIRE (java_class.get_is_inner_class ());
164
- REQUIRE (java_class.get_access () == ID_default );
157
+ REQUIRE (java_class.get_access () == ID_public );
165
158
}
166
159
}
167
160
WHEN (
@@ -184,9 +177,7 @@ SCENARIO(
184
177
" Parsing the InnerClasses attribute for a package private (default) "
185
178
" doubly-nested inner class " )
186
179
{
187
- THEN (
188
- " The inner class should be marked as package-private (default) because "
189
- " its containing class has stricter access " )
180
+ THEN (" The inner class should be marked as protected" )
190
181
{
191
182
const symbolt &class_symbol = new_symbol_table.lookup_ref (
192
183
" java::InnerClassesDeeplyNested$SinglyNestedClass$"
@@ -195,7 +186,7 @@ SCENARIO(
195
186
to_java_class_type (class_symbol.type );
196
187
REQUIRE_FALSE (java_class.get_is_anonymous_class ());
197
188
REQUIRE (java_class.get_is_inner_class ());
198
- REQUIRE (java_class.get_access () == ID_default );
189
+ REQUIRE (java_class.get_access () == ID_protected );
199
190
}
200
191
}
201
192
WHEN (
0 commit comments