File tree 2 files changed +7
-6
lines changed
unit/java_bytecode/java_bytecode_convert_method 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,6 @@ void java_bytecode_convert_methodt::convert(
386
386
387
387
// Obtain a std::vector of code_typet::parametert objects from the
388
388
// (function) type of the symbol
389
-
390
389
code_typet code_type = to_code_type (method_symbol.type );
391
390
code_type.set (ID_C_class, class_symbol.name );
392
391
method_return_type=code_type.return_type ();
@@ -544,8 +543,8 @@ void java_bytecode_convert_methodt::convert(
544
543
}
545
544
else
546
545
{
547
- method_symbol.pretty_name =
548
- id2string (class_symbol. pretty_name ) + " . " + id2string (m .base_name ) + " ()" ;
546
+ method_symbol.pretty_name = id2string (class_symbol. pretty_name ) + " . " +
547
+ id2string (method_symbol .base_name ) + " ()" ;
549
548
}
550
549
551
550
method_symbol.type = code_type;
Original file line number Diff line number Diff line change 1
1
/* ******************************************************************\
2
2
3
- Module: Unit tests for converting abstract classes
3
+ Module: Unit tests for converting constructors and static initializers
4
4
5
- Author: DiffBlue Limited. All rights reserved.
5
+ Author: DiffBlue Limited.
6
6
7
7
\*******************************************************************/
8
8
@@ -42,8 +42,10 @@ void require_is_constructor(const test_datat &test_data)
42
42
// / Verify that a given descriptor is not marked as a constructor in the symbol
43
43
// / table
44
44
// / \param test_data The data to run the test on
45
- void require_is_static_initalizer (const test_datat &test_data)
45
+ void require_is_static_initializer (const test_datat &test_data)
46
46
{
47
+ REQUIRE (
48
+ test_data.constructor_descriptor .find (" <clinit>" ) != std::string::npos);
47
49
const symbolt &constructor =
48
50
test_data.symbol_table .lookup_ref (test_data.constructor_descriptor );
49
51
THEN (" The constructor should be marked as a constructor" )
You can’t perform that action at this time.
0 commit comments