anchor.diff:  
     METHOD encode_decode_pack_long.
   
  +    CONSTANTS: lc_data TYPE x LENGTH 8 VALUE '0123456789ABCDEF'.
  +
       DATA: lt_objects TYPE tt_objects,
             ls_object  LIKE LINE OF lt_objects,
             lv_xstring TYPE xstring,
  
positive.code: 
    ENDMETHOD.                    "repo_url
  
    METHOD convert_int.
  
      DATA: lv_xstring TYPE xstring,
  
negative.code: 
  ENDFORM.                    "run
  
  CLASS ltcl_diff DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
  
    PRIVATE SECTION.
      DATA: mt_local    TYPE TABLE OF string,
            mt_remote   TYPE TABLE OF string,
            mt_expected TYPE tt_diffs,
            ms_expected LIKE LINE OF mt_expected.
  
      METHODS: setup.
      METHODS: test.
  
      METHODS:
        diff01 FOR TESTING,
        diff02 FOR TESTING,
        diff03 FOR TESTING,
        diff04 FOR TESTING,
        diff05 FOR TESTING,
        diff06 FOR TESTING.
  
  ENDCLASS.
  
  CLASS ltcl_diff IMPLEMENTATION.
  
    DEFINE _local.
      append &1 to mt_local.
    END-OF-DEFINITION.
  
    DEFINE _remote.
      append &1 to mt_remote.
    END-OF-DEFINITION.
  
    DEFINE _expected.
      clear ms_expected.
      ms_expected-local = &1.
      ms_expected-result = &2.
      ms_expected-remote = &3.
      append ms_expected to mt_expected.
    END-OF-DEFINITION.
  
    METHOD setup.
      CLEAR mt_local.
      CLEAR mt_remote.
      CLEAR mt_expected.
    ENDMETHOD.
  
    METHOD test.
  
      DATA: lv_local   TYPE string,
            lv_xlocal  TYPE xstring,
            lv_remote  TYPE string,
            lv_xremote TYPE xstring,
            lt_diff    TYPE tt_diffs.
  
  
      CONCATENATE LINES OF mt_local  INTO lv_local SEPARATED BY gc_newline.
      CONCATENATE LINES OF mt_remote INTO lv_remote SEPARATED BY gc_newline.
  
      lv_xlocal  = lcl_convert=>string_to_xstring_utf8( lv_local ).
      lv_xremote = lcl_convert=>string_to_xstring_utf8( lv_remote ).
  
      lt_diff = lcl_diff=>diff( iv_local  = lv_xlocal
                                iv_remote = lv_xremote ).
  
      cl_abap_unit_assert=>assert_equals( act = lt_diff
                                          exp = mt_expected ).
  
  
    ENDMETHOD.
  
    METHOD diff01.
  
  * insert
      _local '1'.
      _expected '1' gc_diff-insert ''.
      test( ).
  
    ENDMETHOD.
  
    METHOD diff02.
  
  * identical
      _local '1'.
      _remote '1'.
      _expected '1' '' '1'.
      test( ).
  
    ENDMETHOD.
  
    METHOD diff03.
  
  * delete
      _remote '1'.
      _expected '' gc_diff-delete '1'.
      test( ).
  
    ENDMETHOD.
  
    METHOD diff04.
  
  * update
      _local '1+'.
      _remote '1'.
      _expected '1+' gc_diff-update '1'.
      test( ).
  
    ENDMETHOD.
  
    METHOD diff05.
  
  * identical
      _local '1'.
      _local '2'.
      _remote '1'.
      _remote '2'.
      _expected '1' '' '1'.
      _expected '2' '' '2'.
      test( ).
  
    ENDMETHOD.
  
    METHOD diff06.
  
      _local '1'.
      _local '2'.
      _local 'inserted'.
      _local '3'.
      _local '4 update'.
  
      _remote '1'.
      _remote '2'.
      _remote '3'.
      _remote '4'.
  
      _expected '1' '' '1'.
      _expected '2' '' '2'.
      _expected 'inserted' gc_diff-insert ''.
      _expected '3' '' '3'.
      _expected '4 update' gc_diff-update '4'.
  
      test( ).
  
    ENDMETHOD.
  
  ENDCLASS.
  
  *----------------------------------------------------------------------*
  *       CLASS test DEFINITION
  *----------------------------------------------------------------------*
  