anchor.diff:        RAISING   lcx_exception.
   
     PRIVATE SECTION.
  +    CLASS-DATA: gv_skip_testclass TYPE abap_bool.
  +
       CLASS-METHODS deserialize_abap
         IMPORTING is_item    TYPE ty_item
                   it_files   TYPE ty_files_tt
  
positive.code: 
    METHOD serialize_testclasses.
  
      CALL FUNCTION 'SEO_CLASS_GET_INCLUDE_SOURCE'
        EXPORTING
          clskey                       = is_clskey
  
negative.code:         OTHERS                       = 3.
      IF sy-subrc <> 0 AND sy-subrc <> 2.
        _raise 'Error from get_include_source, test'.
      ENDIF.
  
  * when creating classes in Eclipse it automatically generates the
  * testclass include, but it is not needed, so skip to avoid
  * creating an extra file in the repository.
  * Also remove it if the content is manually removed, but
  * the class still thinks it contains tests
      gv_skip_testclass = abap_false.
      IF lines( rt_source ) = 2.
        READ TABLE rt_source INDEX 1 INTO lv_line1.
        READ TABLE rt_source INDEX 2 INTO lv_line2.
        IF lv_line1(3) = '*"*' AND lv_line2 IS INITIAL.
          gv_skip_testclass = abap_true.
        ENDIF.
      ELSEIF lines( rt_source ) = 1.
        READ TABLE rt_source INDEX 1 INTO lv_line1.
        IF lv_line1(3) = '*"*' OR lv_line1 IS INITIAL.
          gv_skip_testclass = abap_true.
        ENDIF.
      ELSEIF lines( rt_source ) = 0.
        gv_skip_testclass = abap_true.
      ENDIF.
  
    ENDMETHOD.                    "serialize_test
  