anchor.diff:  
       FIELD-SYMBOLS: <ls_local> LIKE LINE OF mt_local.
   
  -* todo
  +    APPEND INITIAL LINE TO mt_local ASSIGNING <ls_local>.
  +    <ls_local>-item-obj_type = iv_obj_type.
  +    <ls_local>-item-obj_name = iv_obj_name.
  +    <ls_local>-item-devclass = iv_devclass.
  +    <ls_local>-file-path     = iv_path.
  +    <ls_local>-file-filename = iv_filename.
  +    <ls_local>-file-sha1     = iv_sha1.
  +
     ENDMETHOD.
   
     METHOD add_state.
  
positive.code:   <ls_result>-filename = &8.
  END-OF-DEFINITION.
  
  CLASS ltcl_file_status DEFINITION FOR TESTING RISK LEVEL HARMLESS
    DURATION SHORT FINAL.
  
    PRIVATE SECTION.
      DATA: mt_results TYPE zif_abapgit_definitions=>ty_results_tt.
  
      METHODS: calculate_status FOR TESTING RAISING zcx_abapgit_exception.
  
  ENDCLASS.
  
  CLASS ltcl_file_status IMPLEMENTATION.
  
    METHOD calculate_status.
  
      DATA: lt_local       TYPE zif_abapgit_definitions=>ty_files_item_tt,
            lt_remote      TYPE zif_abapgit_definitions=>ty_files_tt,
            lt_state       TYPE zif_abapgit_definitions=>ty_file_signatures_tt,
            lt_results_exp TYPE zif_abapgit_definitions=>ty_results_tt,
            lo_dot         TYPE REF TO zcl_abapgit_dot_abapgit.
  
      FIELD-SYMBOLS: <ls_local>  LIKE LINE OF lt_local,
                     <ls_remote> LIKE LINE OF lt_remote,
                     <ls_result> LIKE LINE OF mt_results,
                     <ls_state>  LIKE LINE OF lt_state.
  
  
      "STATE         FILE                              SHA1
      _append_state '$$zclass1.clas.xml'              'C1_F1'.
      " class1 testclasses is new locally, abap is new remotely
      " class2 is completely new remotely
      _append_state '$$zdoma1.doma.xml'               'D1'.
      _append_state '$$zdoma2.doma.xml'               'D2'.
      _append_state '$$zdoma3.doma.xml'               'D3'.
      " doma4 is new locally
      " doma5 is new remotely
      _append_state '$$zdoma6.doma.xml'               'D6'.
      " doma7 is not in state - emulate brocken cache
      " doma8 is not in state - emulate brocken cache
      _append_state '$$zdoma9.doma.xml'               'D9'.
      _append_state 'num01.doma.xml'                  'NUM01'. " another from different package
      _append_state 'xfeld.doma.xml'                  'XFELD'. " from different package
  
      "LOCAL         TYPE   NAME        FILE                              SHA1
      _append_local 'CLAS' '$$ZCLASS1' '$$zclass1.clas.testclasses.abap' 'C1_F3'.
      _append_local 'CLAS' '$$ZCLASS1' '$$zclass1.clas.xml'              'C1_F1'.
      _append_local 'DOMA' '$$ZDOMA1'  '$$zdoma1.doma.xml'               'D1'.
      _append_local 'DOMA' '$$ZDOMA2'  '$$zdoma2.doma.xml'               'D2_CHANGED_L'.
      _append_local 'DOMA' '$$ZDOMA3'  '$$zdoma3.doma.xml'               'D3'.
      _append_local 'DOMA' '$$ZDOMA4'  '$$zdoma4.doma.xml'               'D4'.
      _append_local 'DOMA' '$$ZDOMA6'  '$$zdoma6.doma.xml'               'D6_CHANGED_L'.
      _append_local 'DOMA' '$$ZDOMA7'  '$$zdoma7.doma.xml'               'D7'.
      _append_local 'DOMA' '$$ZDOMA8'  '$$zdoma8.doma.xml'               'D8'.
      " dome9 was deleted from local system. Can be found by existing state
  
      "REMOTE         FILE                  SHA1
      _append_remote 'textfile.txt'        'T1'.
      _append_remote '$$zclass1.clas.abap' 'C1_F2'. " Must be before xml for tougher test
      _append_remote '$$zclass1.clas.xml'  'C1_F1'.
      _append_remote '$$zclass2.clas.abap' 'C1_F2'. " Must be before xml for tougher test
      _append_remote '$$zclass2.clas.xml'  'C1_F1'.
      _append_remote '$$zdoma1.doma.xml'   'D1'.
      _append_remote '$$zdoma2.doma.xml'   'D2'.
      _append_remote '$$zdoma3.doma.xml'   'D3_CHANGED_R'.
      _append_remote '$$zdoma5.doma.xml'   'D5'.
      _append_remote '$$zdoma6.doma.xml'   'D6_CHANGED_R'.
      _append_remote '$$zdoma7.doma.xml'   'D7'.
      _append_remote '$$zdoma8.doma.xml'   'D8_CHANGED_R'.  " This one is changed
      _append_remote '$$zdoma9.doma.xml'   'D9'.            " This one is deleted locally
      _append_remote 'xfeld.doma.xml'      'XFELD'.         " Object from different package
      _append_remote 'num01.doma.xml'      'NUM01_CHANGED'. " Changed object from different package
  
      "EXP RESULT    TYPE   NAME        MATCH LST   RST  PKG    PATH FILE
      _append_result ''     ''          ' '   ' '   'A'  ''     '/'  'textfile.txt'.
      _append_result 'CLAS' '$$ZCLASS1' ' '   ' '   'A'  '$Z$'  '/'  '$$zclass1.clas.abap'.
      _append_result 'CLAS' '$$ZCLASS1' ' '   'A'   ' '  '$Z$'  '/'  '$$zclass1.clas.testclasses.abap'.
      _append_result 'CLAS' '$$ZCLASS1' 'X'   ' '   ' '  '$Z$'  '/'  '$$zclass1.clas.xml'.
      _append_result 'CLAS' '$$ZCLASS2' ' '   ' '   'A'  ''     '/'  '$$zclass2.clas.abap'.
      _append_result 'CLAS' '$$ZCLASS2' ' '   ' '   'A'  ''     '/'  '$$zclass2.clas.xml'.
      _append_result 'DOMA' '$$ZDOMA1'  'X'   ' '   ' '  '$Z$'  '/'  '$$zdoma1.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA2'  ' '   'M'   ' '  '$Z$'  '/'  '$$zdoma2.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA3'  ' '   ' '   'M'  '$Z$'  '/'  '$$zdoma3.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA4'  ' '   'A'   ' '  '$Z$'  '/'  '$$zdoma4.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA5'  ' '   ' '   'A'  ''     '/'  '$$zdoma5.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA6'  ' '   'M'   'M'  '$Z$'  '/'  '$$zdoma6.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA7'  'X'   ' '   ' '  '$Z$'  '/'  '$$zdoma7.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA8'  ' '   'M'   'M'  '$Z$'  '/'  '$$zdoma8.doma.xml'.
      _append_result 'DOMA' '$$ZDOMA9'  ' '   'D'   ' '  ''     '/'  '$$zdoma9.doma.xml'.
      _append_result 'DOMA' 'NUM01'     ' '   ' '   'M'  'SUTI' '/'  'num01.doma.xml'.
      _append_result 'DOMA' 'XFELD'     'X'   ' '   ' '  'SUTI' '/'  'xfeld.doma.xml'.
      lt_results_exp = mt_results.
  
      lo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
  
      mt_results = zcl_abapgit_file_status=>calculate_status(
        iv_devclass        = '$Z$'
        io_dot             = lo_dot
        it_local           = lt_local
        it_remote          = lt_remote
        it_cur_state       = lt_state ).
  
      cl_abap_unit_assert=>assert_equals(
        act = mt_results
        exp = lt_results_exp ).
  
    ENDMETHOD.
  
  ENDCLASS.
  
  CLASS ltcl_run_checks DEFINITION DEFERRED.
  CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_run_checks.
  
  
negative.code: 
    METHOD run.
  
      DATA: lt_results TYPE zif_abapgit_definitions=>ty_results_tt,
            lo_dot     TYPE REF TO zcl_abapgit_dot_abapgit.
  
  
      lo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
  
      lt_results = zcl_abapgit_file_status=>calculate_status(
        iv_devclass  = iv_devclass
        io_dot       = lo_dot
        it_local     = mt_local
        it_remote    = mt_remote
        it_cur_state = mt_state ).
  
      CREATE OBJECT ro_result
        EXPORTING
          it_results = lt_results.
  
    ENDMETHOD.
  
  ENDCLASS.
  