6
6
7
7
\*******************************************************************/
8
8
9
- #include < catch.hpp>
9
+ #include < testing-utils/catch.hpp>
10
+ #include < testing-utils/load_java_class.h>
10
11
11
12
#include < istream>
12
13
#include < memory>
15
16
#include < util/language.h>
16
17
#include < util/message.h>
17
18
#include < java_bytecode/java_bytecode_language.h>
18
- #include < src/java_bytecode/load_java_class.h>
19
19
20
20
SCENARIO (
21
21
" java_bytecode_parse_generics" ,
@@ -32,7 +32,7 @@ SCENARIO(
32
32
THEN (" The symbol type should be generic" )
33
33
{
34
34
const symbolt &class_symbol=
35
- new_symbol_table.lookup (" java::generics$element" ). value (). get ( );
35
+ new_symbol_table.lookup_ref (" java::generics$element" );
36
36
const typet &symbol_type=class_symbol.type ;
37
37
38
38
REQUIRE (symbol_type.id ()==ID_struct);
@@ -76,7 +76,7 @@ SCENARIO(
76
76
THEN (" The symbol type should be generic" )
77
77
{
78
78
const symbolt &class_symbol=
79
- new_symbol_table.lookup (" java::generics$bound_element" ). value (). get ( );
79
+ new_symbol_table.lookup_ref (" java::generics$bound_element" );
80
80
const typet &symbol_type=class_symbol.type ;
81
81
82
82
REQUIRE (symbol_type.id ()==ID_struct);
@@ -127,8 +127,8 @@ SCENARIO(
127
127
128
128
THEN (" The generic fields should be annotated with concrete types" )
129
129
{
130
- const symbolt &class_symbol=new_symbol_table. lookup ( " java::generics " )
131
- . value (). get ( );
130
+ const symbolt &class_symbol=
131
+ new_symbol_table. lookup_ref ( " java::generics " );
132
132
const typet &symbol_type=class_symbol.type ;
133
133
134
134
REQUIRE (symbol_type.id ()==ID_struct);
@@ -236,8 +236,7 @@ SCENARIO(
236
236
THEN (" The symbol should have a generic parameter" )
237
237
{
238
238
const symbolt &class_symbol=
239
- new_symbol_table.lookup (" java::generics$double_bound_element" )
240
- .value ().get ();
239
+ new_symbol_table.lookup_ref (" java::generics$double_bound_element" );
241
240
const typet &symbol_type=class_symbol.type ;
242
241
243
242
REQUIRE (symbol_type.id ()==ID_struct);
@@ -276,7 +275,7 @@ SCENARIO(
276
275
THEN (" Both generic parameters should be encoded" )
277
276
{
278
277
const symbolt &class_symbol=
279
- new_symbol_table.lookup (" java::generics$two_elements" ). value (). get ( );
278
+ new_symbol_table.lookup_ref (" java::generics$two_elements" );
280
279
const typet &symbol_type=class_symbol.type ;
281
280
282
281
REQUIRE (symbol_type.id ()==ID_struct);
0 commit comments