23 const std::string &lambda_method_ref)
25 typedef java_bytecode_parse_treet::classt::lambda_method_handle_mapt::
26 value_type lambda_method_entryt;
28 INFO(
"Looking for entry with lambda_method_ref: " << lambda_method_ref);
29 const irep_idt method_ref_with_prefix =
32 std::vector<lambda_method_entryt> matches;
36 back_inserter(matches),
37 [&method_ref_with_prefix](
const lambda_method_entryt &entry) {
39 entry.second.get_method_descriptor().get_identifier() ==
40 method_ref_with_prefix);
42 REQUIRE(matches.size() == 1);
43 return matches.at(0).second;
54 const auto method = std::find_if(
58 return method.name == method_name;
61 INFO(
"Looking for method: " << method_name);
62 std::ostringstream found_methods;
63 for(
const auto &entry : parsed_class.
methods)
65 found_methods <<
id2string(entry.name) << std::endl;
67 INFO(
"Found methods:\n" << found_methods.str());
69 REQUIRE(method != parsed_class.
methods.end());
81 REQUIRE(instructions.size() == expected_instructions.size());
82 auto actual_instruction_it = instructions.begin();
83 for(
const auto &expected_instruction : expected_instructions)
85 expected_instruction.require_instructions_equal(*actual_instruction_it);
86 ++actual_instruction_it;
98 auto actual_arg_it = actual_instruction.
args.begin();
99 for(
const exprt &expected_arg : actual_instruction.
args)
101 INFO(
"Expected argument" << expected_arg.
pretty());
102 INFO(
"Actual argument" << actual_arg_it->pretty());
103 REQUIRE(*actual_arg_it == expected_arg);