Ad
  • Custom User Avatar

    no, since expected and actual are swapped, so when you read something like:

    log:
    return 33
    failed test: 42 should equal 33
    

    (because I guess that's globaly what you are seeing), that actually means you should read/have:

    log:
    return 33
    failed test: 33 should equal 42
    

    Meaning your code isn't returning the expected value.

  • Custom User Avatar

    no global vars here, but rather an actual mistake in the translation. @joh_pot: please see above.

    @ferrara: still, your solution isn't correct, so. ;)

  • Default User Avatar

    It seems like you're attempting the python translation. I'm not the author of the python translation and I'm not versed in the language but it seems like you're using global variables to track state. The test suite calls your function hundreds of times and if you're not resetting your global vars, it will fail.

  • Custom User Avatar

    Your functions should return in CW, not print. Also, use Question, not Issue label for things like this, and use proper markdown

  • Custom User Avatar

    You're not returning anything.

  • Custom User Avatar

    printf("left=%d right=%d call=%d\n, left, right, call);

    Print the inputs, and see what cases you're failing.

  • Default User Avatar

    Not sure what language you are using, but try to print out what the inputs are for debugging purposes.