• Custom User Avatar

    @Anjali Singh why did you copy the tests code? Please use the initial code:

    def number_to_string(num):
        # Return a string of the number here!
    

    Probably you forfeited the kata. Not the same problem as the OP one.

  • Custom User Avatar

    same with me ia am using python but it is showing wrong

  • Custom User Avatar

    Your solution has a bug, it fails for some very specific inputs. It even fails example tests, which you can see and inspect.

    Your solution being buggy is not a kata issue.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    the code has been updated recently

    • copy your code (so you don't lose it)
    • refresh the page
    • click reset
    • paste in your code
    • try again
  • Custom User Avatar

    I seem to be getting an error from the testing code. I am using C, and it does not recognize the tester() method.

    The errors:

    /tmp/fixture-06cea8.o: In function `Fixed_cases_should_return_number_as_string_impl':

    fixture.c:(.text+0x31): undefined reference to `tester'

    fixture.c:(.text+0x45): undefined reference to `tester'

    fixture.c:(.text+0x59): undefined reference to `tester'

    fixture.c:(.text+0x6d): undefined reference to `tester'

    fixture.c:(.text+0x81): undefined reference to `tester'

    /tmp/fixture-06cea8.o:fixture.c:(.text+0x95): more undefined references to `tester' follow
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Code in the testing file:
    #include <criterion/criterion.h>

    extern void tester(int number, const char* expected);

    Test(Fixed_cases, should_return_number_as_string) {

    tester(          0,           "0");
    
    tester(          1,           "1");
    
    tester(         -7,          "-7");
    
    tester(      99999,       "99999");
    
    tester(       -273,        "-273");
    
    tester(      2 + 2,           "4");
    
    tester(      6 * 7,          "42");
    
    tester(    10 - 10,           "0");
    
    tester( 2147483647,  "2147483647");
    
    tester(-2147483647, "-2147483647");
    

    }