-
Notifications
You must be signed in to change notification settings - Fork 0
Initial set of unit tests for static and local lamdbas #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial set of unit tests for static and local lamdbas #2
Conversation
/// Represents the argument of an instruction that uses a CONSTANT_Fieldref | ||
/// This is used for example as an argument to a getstatic and putstatic | ||
/// instruction | ||
class fieldref_exprt : public exprt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this is pulled into its own PR: diffblue#1856
bf53c54
to
a8f0116
Compare
10d4391
to
e7e0e22
Compare
@mgudemann This is now ready for review and inclusion into the PR - I wonder if some of the tests are kind of redundant (e.g. we have the exhaustive static set, but then for member and local variable we just care about the ones that capture variables since they are the only ones that behave differently, what do you think? |
7e7c571
to
1069cae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just some minor comments
require_parse_tree::lambda_method_handlet | ||
require_parse_tree::require_lambda_entry_for_descriptor( | ||
const java_bytecode_parse_treet::classt &parsed_class, | ||
std::string descriptor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not const
?
typedef java_bytecode_parse_treet::classt::lambda_method_handle_mapt:: | ||
value_type lambda_method_entryt; | ||
|
||
int matches_found = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size_t
or unsigned
|
||
int matches_found = 0; | ||
|
||
const auto matching_lambda_entry = std::find_if( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might also count to detect several matching entries
e7e0e22
to
406fc00
Compare
Currently in a misnamed file
java_bytecode_parser_rclass_attribute.cpp