Skip to content

Commit

Permalink
Introduce checks the the function body for Execute calls the correct …
Browse files Browse the repository at this point in the history
…lambda
  • Loading branch information
thk123 committed Mar 27, 2018
1 parent 2348d10 commit ee2179c
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@ SCENARIO(
lambda_implementor_type_symbol.type);

REQUIRE(tmp_lambda_class_type.has_base("java::SimpleLambda"));

THEN("The function in the class should call the lambda method")
{
const irep_idt method_identifier =
id2string(tmp_class_identifier) + ".Execute:()V";
const symbolt &method_symbol =
require_symbol::require_symbol_exists(
symbol_table, method_identifier);

REQUIRE(method_symbol.is_function());

const std::vector<codet> &assignments =
require_goto_statements::get_all_statements(method_symbol.value);

require_goto_statements::require_function_call(
assignments, "java::LocalLambdas.lambda$test$0:()V");
}
}
}
}
Expand Down

0 comments on commit ee2179c

Please sign in to comment.