Ad
  • Default User Avatar

    Haskell tests appear to be broken. My solution failed on the randomized tests:
    Falsifiable (after 7 tests and 4 shrinks):
    "aa\71319a"
    expected: "a2a"
    but got: "aa\71319a"
    Is \71319 supposed to be a character?

  • Default User Avatar

    Okay so I tried your code and it seems that for the test case (-y+11)(-55y-6) your answer is y^2-5y-66, which is wrong.
    The answer should be 55y^2-599y-66.
    I think maybe it's caused by the "-y" in the first bracket which doesn't have a number coefficient?
    By the way my test case doesn't include (y-11)(y+6).
    Please check your code again and let me know if there are any further problems.

  • Default User Avatar

    I think it's because the sympy module is not supported in codewars.
    I didn't explicitly add any code in my test cases to disallow any modules.

  • Default User Avatar

    Approved! :D

  • Default User Avatar

    @anter69
    I have added a few new fixed test cases, but your code still seems to work though.
    If your solution originally returns the wrong answer, then how can it still work now?
    I think your original solution is correct, but thanks for the suggestions anyway :)

  • Default User Avatar

    Thanks a lot for the feedback!
    I will change it as soon as possible.

  • Default User Avatar

    Sorry I didn't know that it was a duplicate.
    I will just unpublish it then.

  • Default User Avatar

    Yay done now :D
    Everything should be alright now.

  • Default User Avatar

    Okk noted changing it now

  • Default User Avatar

    Thanks @XRFXLP for editing and improving my kata test suite.
    Finally now I can understand FArekkusu's earlier request about wrapping the referrence solution.
    Sorry for being rude earlier, but I must say FArekkusu did not explain his requests clearly.
    And for reading the documentation, I did read it but the docs are very vague on how to handle reference solutions inside the test suite.
    Anyway thanks for the help and sorry for the inconvenience caused.
    @FArekkusu it would be better if you can explain clearly what issues you want me to fix the next time, I am still a newbie :)

  • Default User Avatar

    Yea as I said I tried to follow FArekkusu's advice to wrap the reference solution inside a describe or it block,
    but both did not work and threw errors.
    the other issues about appropriate describe and it blocks have been fixed I guess, unless FArekkusu have some other demands to my test suite

  • Default User Avatar

    Ok an "it" has been put around each individual random test

  • Default User Avatar

    Ahh so that's what he was talking about.
    Thanks @dfhwze
    Please be more specific next time @FArekkusu.
    And just for clarification, the issues on importing the solution and sample tests have been fixed.

  • Default User Avatar

    Sample tests are still not in a describe block.

    What do you mean? I have literally put the line @test.describe("Example Tests") on top of the sample test method.

    Sample tests still don't import the solution.

    What now? I changed the method in the assert_equals() from quadratic_builder to solution.quadratic_builder and I have added import solution in the beginning.

  • Default User Avatar

    If what you want is for me to put an it block for every test case I have,
    I think you haven't noticed that I have 41 tests, not just a few.
    Why do I have to waste time to seperate individual test cases when I can just group them together?

  • Loading more items...