@@ -26,6 +26,10 @@ SCENARIO(
26
26
type_try_dynamic_cast<java_class_typet>(class_symbol->type );
27
27
REQUIRE (class_type);
28
28
29
+ THEN (" The inner class should have the name \" java::Outer$Inner\" ." )
30
+ {
31
+ REQUIRE (id2string (class_type->get_name ()) == " java::Outer$Inner" );
32
+ }
29
33
THEN (" The inner class should have the inner name \" Inner\" ." )
30
34
{
31
35
REQUIRE (id2string (class_type->get_inner_name ()) == " Inner" );
@@ -52,6 +56,10 @@ SCENARIO(
52
56
type_try_dynamic_cast<java_class_typet>(class_symbol->type );
53
57
REQUIRE (class_type);
54
58
59
+ THEN (" The outer class should have the name \" java::Outer\" ." )
60
+ {
61
+ REQUIRE (id2string (class_type->get_name ()) == " java::Outer" );
62
+ }
55
63
THEN (" The outer class should not have an inner name." )
56
64
{
57
65
REQUIRE (id2string (class_type->get_inner_name ()).empty ());
@@ -78,6 +86,10 @@ SCENARIO(
78
86
type_try_dynamic_cast<java_class_typet>(class_symbol->type );
79
87
REQUIRE (class_type);
80
88
89
+ THEN (" The anonymous class should have the name \" java::Outer$1\" ." )
90
+ {
91
+ REQUIRE (id2string (class_type->get_name ()) == " java::Outer$1" );
92
+ }
81
93
THEN (" The anonymous class should not have an inner name." )
82
94
{
83
95
REQUIRE (id2string (class_type->get_inner_name ()).empty ());
@@ -104,6 +116,10 @@ SCENARIO(
104
116
type_try_dynamic_cast<java_class_typet>(class_symbol->type );
105
117
REQUIRE (class_type);
106
118
119
+ THEN (" The outer class should have the name \" java::Outer$RedHerring\" ." )
120
+ {
121
+ REQUIRE (id2string (class_type->get_name ()) == " java::Outer$RedHerring" );
122
+ }
107
123
THEN (" The outer class should not have an inner name." )
108
124
{
109
125
REQUIRE (id2string (class_type->get_inner_name ()).empty ());
0 commit comments