Skip to content

Commit

Permalink
line_exists instead of read table
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmink committed Sep 26, 2023
1 parent 5784de0 commit bdf6642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/z_generate_repo.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -1213,8 +1213,8 @@ CLASS ltcl_generator IMPLEMENTATION.
cl_abap_unit_assert=>assert_equals( act = cut->report_log exp = expected_report_log ).
cl_abap_unit_assert=>assert_equals( act = lines( cut->generator_log->get_messages( ) ) exp = lines( expected_log_messages ) ).
LOOP AT expected_log_messages ASSIGNING FIELD-SYMBOL(<exp_msg>).
READ TABLE cut->generator_log->get_messages( ) WITH KEY message_text = <exp_msg>-message_text TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
DATA(messages) = cut->generator_log->get_messages( ).
IF line_exists( messages[ message_text = <exp_msg>-message_text ] ).
cl_abap_unit_assert=>fail( ).
ENDIF.
ENDLOOP.
Expand Down

0 comments on commit bdf6642

Please sign in to comment.