@@ -33,17 +33,16 @@ SCENARIO(
33
33
GIVEN (
34
34
" A class with a static lambda variables from " + compiler + " compiler." )
35
35
{
36
- java_bytecode_parse_treet parse_tree;
37
- java_bytecode_parse (
36
+ optionalt<java_bytecode_parse_treet> parse_tree = java_bytecode_parse (
38
37
" ./java_bytecode/java_bytecode_parse_lambdas/lambda_examples/" +
39
38
compiler + " _classes/StaticLambdas.class" ,
40
- parse_tree,
41
39
message_handler);
42
40
WHEN (" Parsing that class" )
43
41
{
44
- REQUIRE (parse_tree.loading_successful );
45
- const java_bytecode_parse_treet::classt parsed_class =
46
- parse_tree.parsed_class ;
42
+ REQUIRE (parse_tree);
43
+ REQUIRE (parse_tree->loading_successful );
44
+ const java_bytecode_parse_treet::classt &parsed_class =
45
+ parse_tree->parsed_class ;
47
46
REQUIRE (parsed_class.attribute_bootstrapmethods_read );
48
47
REQUIRE (parsed_class.lambda_method_handle_map .size () == 12 );
49
48
@@ -345,17 +344,16 @@ SCENARIO(
345
344
null_message_handlert message_handler;
346
345
GIVEN (" A method with local lambdas from " + compiler + " compiler." )
347
346
{
348
- java_bytecode_parse_treet parse_tree;
349
- java_bytecode_parse (
347
+ optionalt<java_bytecode_parse_treet> parse_tree = java_bytecode_parse (
350
348
" ./java_bytecode/java_bytecode_parse_lambdas/lambda_examples/" +
351
349
compiler + " _classes/LocalLambdas.class" ,
352
- parse_tree,
353
350
message_handler);
354
351
WHEN (" Parsing that class" )
355
352
{
356
- REQUIRE (parse_tree.loading_successful );
357
- const java_bytecode_parse_treet::classt parsed_class =
358
- parse_tree.parsed_class ;
353
+ REQUIRE (parse_tree);
354
+ REQUIRE (parse_tree->loading_successful );
355
+ const java_bytecode_parse_treet::classt &parsed_class =
356
+ parse_tree->parsed_class ;
359
357
REQUIRE (parsed_class.attribute_bootstrapmethods_read );
360
358
REQUIRE (parsed_class.lambda_method_handle_map .size () == 12 );
361
359
@@ -655,17 +653,16 @@ SCENARIO(
655
653
" A class that has lambdas as member variables from " + compiler +
656
654
" compiler." )
657
655
{
658
- java_bytecode_parse_treet parse_tree;
659
- java_bytecode_parse (
656
+ optionalt<java_bytecode_parse_treet> parse_tree = java_bytecode_parse (
660
657
" ./java_bytecode/java_bytecode_parse_lambdas/lambda_examples/" +
661
658
compiler + " _classes/MemberLambdas.class" ,
662
- parse_tree,
663
659
message_handler);
664
660
WHEN (" Parsing that class" )
665
661
{
666
- REQUIRE (parse_tree.loading_successful );
667
- const java_bytecode_parse_treet::classt parsed_class =
668
- parse_tree.parsed_class ;
662
+ REQUIRE (parse_tree);
663
+ REQUIRE (parse_tree->loading_successful );
664
+ const java_bytecode_parse_treet::classt &parsed_class =
665
+ parse_tree->parsed_class ;
669
666
REQUIRE (parsed_class.attribute_bootstrapmethods_read );
670
667
REQUIRE (parsed_class.lambda_method_handle_map .size () == 12 );
671
668
@@ -991,17 +988,16 @@ SCENARIO(
991
988
" variables from " +
992
989
compiler + " compiler." )
993
990
{
994
- java_bytecode_parse_treet parse_tree;
995
- java_bytecode_parse (
991
+ optionalt<java_bytecode_parse_treet> parse_tree = java_bytecode_parse (
996
992
" ./java_bytecode/java_bytecode_parse_lambdas/lambda_examples/" +
997
993
compiler + " _classes/OuterMemberLambdas$Inner.class" ,
998
- parse_tree,
999
994
message_handler);
1000
995
WHEN (" Parsing that class" )
1001
996
{
1002
- REQUIRE (parse_tree.loading_successful );
1003
- const java_bytecode_parse_treet::classt parsed_class =
1004
- parse_tree.parsed_class ;
997
+ REQUIRE (parse_tree);
998
+ REQUIRE (parse_tree->loading_successful );
999
+ const java_bytecode_parse_treet::classt &parsed_class =
1000
+ parse_tree->parsed_class ;
1005
1001
REQUIRE (parsed_class.attribute_bootstrapmethods_read );
1006
1002
REQUIRE (parsed_class.lambda_method_handle_map .size () == 3 );
1007
1003
0 commit comments