From 5435f89d0a3d2bbcae2c585ae6aac87e8a5fba59 Mon Sep 17 00:00:00 2001 From: Christian Guenter Date: Wed, 15 Jan 2025 15:55:42 +0000 Subject: [PATCH] fixup --- src/utils/zcl_abapgit_diff.clas.abap | 8 ++++---- .../zcl_abapgit_diff.clas.testclasses.abap | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/utils/zcl_abapgit_diff.clas.abap b/src/utils/zcl_abapgit_diff.clas.abap index e530092bd..b8e936abd 100644 --- a/src/utils/zcl_abapgit_diff.clas.abap +++ b/src/utils/zcl_abapgit_diff.clas.abap @@ -571,10 +571,10 @@ CLASS zcl_abapgit_diff IMPLEMENTATION. " SAP function ignores lines that contain only whitespace so we compare directly " Also check if length differs and implicitly if one line has trailing space(s) - rv_has_diff = xsdbool( iv_old <> iv_new - AND ( strlen( condense( iv_old ) ) = 0 - OR strlen( condense( iv_new ) ) = 0 - OR strlen( iv_old ) <> strlen( iv_new ) ) ). + rv_has_diff = boolc( iv_old <> iv_new + AND ( strlen( condense( iv_old ) ) = 0 + OR strlen( condense( iv_new ) ) = 0 + OR strlen( iv_old ) <> strlen( iv_new ) ) ). ENDMETHOD. diff --git a/src/utils/zcl_abapgit_diff.clas.testclasses.abap b/src/utils/zcl_abapgit_diff.clas.testclasses.abap index bfd07260a..a44c503c1 100644 --- a/src/utils/zcl_abapgit_diff.clas.testclasses.abap +++ b/src/utils/zcl_abapgit_diff.clas.testclasses.abap @@ -49,6 +49,7 @@ CLASS ltcl_diff DEFINITION FOR TESTING diff15 FOR TESTING RAISING zcx_abapgit_exception, diff16 FOR TESTING RAISING zcx_abapgit_exception, diff17 FOR TESTING RAISING zcx_abapgit_exception, + diff18 FOR TESTING RAISING zcx_abapgit_exception, map_beacons FOR TESTING RAISING zcx_abapgit_exception. ENDCLASS. @@ -628,6 +629,24 @@ CLASS ltcl_diff IMPLEMENTATION. ENDMETHOD. + METHOD diff18. + + " no diff + add_new( `* Test` ). + + add_old( `* Test` ). + + add_expected( iv_new_num = ' 1' + iv_new = `* Test` + iv_result = zif_abapgit_definitions=>c_diff-unchanged + iv_old_num = ' 1' + iv_old = `* Test` ). + + test( ). + + ENDMETHOD. + + METHOD map_beacons. add_new( `REPORT ztest_beacon.` ).