|
8 | 8 |
|
9 | 9 | #include <testing-utils/catch.hpp>
|
10 | 10 | #include <testing-utils/load_java_class.h>
|
11 |
| - |
12 |
| -#include <util/config.h> |
13 |
| -#include <util/language.h> |
14 |
| -#include <java_bytecode/java_bytecode_language.h> |
15 |
| -#include <iostream> |
| 11 | +#include <testing-utils/require_type.h> |
16 | 12 |
|
17 | 13 | SCENARIO(
|
18 |
| - "parse_derived_generic_class", |
| 14 | + "parse_derived_generic_class_inst", |
19 | 15 | "[core][java_bytecode][java_bytecode_parse_generics]")
|
20 | 16 | {
|
21 | 17 | const symbol_tablet &new_symbol_table = load_java_class(
|
22 |
| - "DerivedGeneric", "./java_bytecode/java_bytecode_parse_generics"); |
| 18 | + "DerivedGenericInst", "./java_bytecode/java_bytecode_parse_generics"); |
23 | 19 |
|
24 |
| - THEN("There should be a symbol for the DerivedGeneric class") |
| 20 | + THEN("There should be a symbol for the DerivedGenericInst class") |
25 | 21 | {
|
26 |
| - std::string class_prefix = "java::DerivedGeneric"; |
| 22 | + std::string class_prefix = "java::DerivedGenericInst"; |
27 | 23 | REQUIRE(new_symbol_table.has_symbol(class_prefix));
|
28 | 24 |
|
29 | 25 | const symbolt &derived_symbol = new_symbol_table.lookup_ref(class_prefix);
|
30 |
| - derived_symbol.show(std::cout); |
31 | 26 | const class_typet &derived_class_type =
|
32 |
| - require_symbol::require_complete_class(derived_symbol); |
| 27 | + require_type::require_java_non_generic_class(derived_symbol.type); |
| 28 | + |
| 29 | + // TODO: Currently we do not support extracting information |
| 30 | + // about the base classes generic information - issue TG-1287 |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +SCENARIO( |
| 35 | + "parse_derived_generic_class_uninst", |
| 36 | + "[core][java_bytecode][java_bytecode_parse_generics]") |
| 37 | +{ |
| 38 | + const symbol_tablet &new_symbol_table = load_java_class( |
| 39 | + "DerivedGenericUninst", "./java_bytecode/java_bytecode_parse_generics"); |
| 40 | + |
| 41 | + THEN("There should be a symbol for the DerivedGenericUninst class") |
| 42 | + { |
| 43 | + std::string class_prefix = "java::DerivedGenericUninst"; |
| 44 | + REQUIRE(new_symbol_table.has_symbol(class_prefix)); |
| 45 | + |
| 46 | + const symbolt &derived_symbol = new_symbol_table.lookup_ref(class_prefix); |
| 47 | + const java_generics_class_typet &derived_class_type = |
| 48 | + require_type::require_java_generic_class( |
| 49 | + derived_symbol.type, {class_prefix + "::T"}); |
33 | 50 |
|
34 |
| - // TODO(tkiley): Currently we do not support extracting information |
| 51 | + // TODO: Currently we do not support extracting information |
35 | 52 | // about the base classes generic information - issue TG-1287
|
36 | 53 | }
|
37 | 54 | }
|
0 commit comments