File tree 3 files changed +29
-0
lines changed
java_bytecode/java_static_initializers
3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ SRC += java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp \
47
47
java_bytecode/java_object_factory/gen_nondet_string_init.cpp \
48
48
java_bytecode/java_object_factory/struct_tag_types.cpp \
49
49
java_bytecode/java_replace_nondet/replace_nondet.cpp \
50
+ java_bytecode/java_static_initializers/java_static_initializers.cpp \
50
51
java_bytecode/java_string_library_preprocess/convert_exprt_to_string_exprt.cpp \
51
52
java_bytecode/java_types/erase_type_arguments.cpp \
52
53
java_bytecode/java_types/generic_type_index.cpp \
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************\
2
+
3
+ Module: Unit tests for java_types
4
+
5
+ Author: Diffblue Ltd.
6
+
7
+ \*******************************************************************/
8
+
9
+ #include < java_bytecode/java_static_initializers.h>
10
+ #include < testing-utils/use_catch.h>
11
+
12
+ SCENARIO (" is_clinit_function" , " [core][java_static_initializers]" )
13
+ {
14
+ GIVEN (" A function id that represents a clinit" )
15
+ THEN (" is_clinit_function should return true." )
16
+ {
17
+ const std::string input = " com.something.package.TestClass.<clinit>:()V" ;
18
+ REQUIRE (is_clinit_function (input));
19
+ }
20
+ GIVEN (" A function id that does not represent a clinit" )
21
+ THEN (" is_clinit_function should return false." )
22
+ {
23
+ const std::string input = " com.something.package.TestClass.<notclinit>:()V" ;
24
+ REQUIRE_FALSE (is_clinit_function (input));
25
+ }
26
+ }
Original file line number Diff line number Diff line change
1
+ java_bytecode
2
+ testing-utils
You can’t perform that action at this time.
0 commit comments