Skip to content

Commit d2ed92b

Browse files
author
thk123
committed
Adding test for lambda taking array parameters
1 parent d171f64 commit d2ed92b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,23 @@ SCENARIO(
143143
"Object;LDummyGeneric;)V";
144144
validate_lamdba_assignement(symbol_table, instructions, test_data);
145145
}
146+
THEN(
147+
"The local variable should be assigned a non-null pointer to a "
148+
"array parameter interface implementor")
149+
{
150+
lambda_assignment_test_datat test_data;
151+
152+
test_data.lambda_variable_id =
153+
std::regex(function_prefix_regex_str + "::\\d+::arrayParamLambda$");
154+
155+
test_data.lambda_interface = "java::ArrayParameterLambda";
156+
test_data.lambda_interface_method_descriptor =
157+
".Execute:([I[Ljava/lang/Object;[LDummyGeneric;)V";
158+
test_data.lambda_function_id =
159+
"java::LocalLambdas.lambda$test$2:"
160+
"([I[Ljava/lang/Object;[LDummyGeneric;)V";
161+
validate_lamdba_assignement(symbol_table, instructions, test_data);
162+
}
146163
}
147164
}
148165
});

0 commit comments

Comments
 (0)