Git Product home page Git Product logo

abap-test-runner's Introduction

For support, please post in the new Exercism forum. New posts here will be closed.


Welcome to Exercism

Where to open issues

For the time being we are triaging all issues from our forum. Please start a new topic there for your issue (presuming there isn't one already). Issues opened here will be automatically closed and you will receive a message redirecting you to the forum.

Feeling uncomfortable?

If you need to report a code of conduct violation, please email us at [email protected] and include [CoC] in the subject line. We will follow up with you as a priority.

Where to find the code

The code for the website lives in exercism/website. The code for the old website is in this repository, in the v1.exercism.io branch.

Who's behind Exercism?

Read about our Team on the site: https://exercism.org/team

abap-test-runner's People

Contributors

dependabot[bot] avatar erikschierboom avatar exercism-bot avatar ihid avatar larshp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

abap-test-runner's Issues

Atbash Cipher: Tests fail

Runs without errors in ABAP. Not sure why it fails on the easy test cases but passes the more difficult ones. Maybe something with strlen?

CLASS zcl_atbash_cipher IMPLEMENTATION.

  METHOD decode.
    plain_text = replace( 
      val  = encode( cipher_text )
      sub  = ` `
      with = ``
      occ  = 0 ).
  ENDMETHOD.

  METHOD encode.
    CONSTANTS abc TYPE string VALUE 'abcdefghijklmnopqrstuvwxyz'.
    DATA(text) = replace( val   = to_lower( plain_text )
                          regex = `[ .,]`
                          with  = ``
                          occ   = 0 ).
    DATA(idx) = 0.
    WHILE idx < strlen( text ).
      DATA(pos) = 25 - find( val = abc
                             sub = text+idx(1) ).
      IF pos BETWEEN 0 AND 25.
        cipher_text = cipher_text && substring( val = abc
                                                off = pos
                                                len = 1 ).
      ELSE.
        cipher_text = cipher_text && text+idx(1).
      ENDIF.
      idx = idx + 1.
      IF idx MOD 5 = 0 AND idx < strlen( text ).
        cipher_text = cipher_text && ` `.
      ENDIF.
    ENDWHILE.
  ENDMETHOD.
ENDCLASS.
ZCL_ATBASH_CIPHER: running ltcl_test->encode1
ZCL_ATBASH_CIPHER: running ltcl_test->encode2
ZCL_ATBASH_CIPHER: running ltcl_test->encode3
ZCL_ATBASH_CIPHER: running ltcl_test->encode4

Error: ASSERT failed

Inline data declaration

CLASS zcl_two_fer DEFINITION PUBLIC.
  PUBLIC SECTION.
    METHODS two_fer
      IMPORTING
        input         TYPE string OPTIONAL
      RETURNING
        VALUE(result) TYPE string.
ENDCLASS.

CLASS zcl_two_fer IMPLEMENTATION.

  METHOD two_fer.
    if input = ''.
      data(name) = 'you'.
    else.
      name = input.
    endif.
    result = |One for { name }, one for me.|.
  ENDMETHOD.

ENDCLASS.
ZCL_TWO_FER: running ltcl_two_fer->test_empty

ReferenceError: name is not defined
    at zcl_two_fer.two_fer (file:///tmp/exercism-abap-runner-DImz7j/compiled/zcl_two_fer.clas.mjs:19:27)
    at ltcl_two_fer.test_empty (file:///tmp/exercism-abap-runner-DImz7j/compiled/zcl_two_fer.clas.testclasses.mjs:15:88)
    at run (file:///tmp/exercism-abap-runner-DImz7j/compiled/index.mjs:69:14)

Clock test fails

ZCL_CLOCK: running ltcl_clock->on_the_hour

Error: ASSERT failed
CLASS zcl_clock DEFINITION
  PUBLIC
  CREATE PUBLIC.

  PUBLIC SECTION.

    METHODS constructor
      IMPORTING
        !hours   TYPE i
        !minutes TYPE i DEFAULT 0.
    METHODS get
      RETURNING
        VALUE(result) TYPE string.
    METHODS add
      IMPORTING
        !minutes TYPE i.
    METHODS sub
      IMPORTING
        !minutes TYPE i.

  PRIVATE SECTION.

    DATA clock TYPE t.

ENDCLASS.



CLASS zcl_clock IMPLEMENTATION.


  METHOD add.
    clock = clock + minutes * 60.
  ENDMETHOD.


  METHOD constructor.
    " Clock is number of seconds
    clock = hours * 60 * 60 + minutes * 60.
  ENDMETHOD.


  METHOD get.
    " hh:mm:ss
    result = |{ clock TIME = ISO }|.
    " return only hh:mm
    result = result(5).
  ENDMETHOD.


  METHOD sub.
    clock = clock - minutes * 60.
  ENDMETHOD.
ENDCLASS.

github settings changes -> admin

@iHiD can you help updating below for this repository,

  • set branch main to protected
  • remove the projects view
  • remove the wiki view
  • remove releases on front page
  • remove packages on front page
  • set "always suggest update branch"
  • set "auto delete branch after merge"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.