Ad
  • Custom User Avatar

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

  • Custom User Avatar

    seems like you solved it soooo...

  • Custom User Avatar
  • Custom User Avatar

    Hi,

    MMmmmhh... I guess that means you either didn't see or didn't understood the stuff logged to the console, telling what team is tested at what point...
    Mmmmmmmhhh... Let's rebuild this with it blocks.

    Note: those assertions need Test.assert_equals, if you wanna have the expected/actual thing in the error message.

  • Custom User Avatar

    I have a small suggestion to make the kata's Test and Attempts failed test results a bit more clear.
    Instead of printing "Nope!", I would suggest to print a message giving a hint about the method name and the passed arguments of each test.

    E.g.:

    Let's imagine that the the second test of Test failed.

    Current test and failure message:

    Test.expect(lt.get_points("Man Utd") == 3, "Nope!")
    
     Nope! -  Expected: 3, instead got: 0
    

    Suggested test/failure message:

    Test.expect(lt.get_points("Man Utd") == 3, "Wrong number of points for Man Utd.")
    
    Wrong number of points for Man Utd. -  Expected: 3, instead got: 0
    
  • Custom User Avatar

    Thanks for your prompt answer.
    I will follow the guidelines and ask a question about this kata, if it still make sense to ask it after my code recheck.

    [EDIT] it was definitely my code, sorry for this and thanks again for your support.

  • Custom User Avatar

    Hi,

    Well... errr... first, there is no Test.expect in the "attempt" part of the tests. If you see this, that means it's in the sample tests. Then, we aren't in your mind and we don't see your code. So... How are we supposed to help you, here? x)

    I just tested my code on the sample tests and everything is going smoothly, so the error is somewhere in your code/algo. In this kind of case, the first step for you would be "pen & paper": retrace by hand what's happening to see what you forgot/misunderstood.

    Generic message below, about the local terminology:




    Seems you're "rather new" to cw, so here are some general guidelines about the comments:

    • Issue: problem in the kata itself (description, wrong tests, wrong internal solution...)
    • Suggestions: well, I guess that part is clear
    • Question anything else that is related to you having a problem solving a kata -> that's you, currently.

    When you post issues:

    • provide ALL the useful information:
      • language
      • input
      • outputs (actual expected) when relevant
      • error message when relevant
    • check, DOUBLE check that this IS an issue, meaning that the problem is in the kata itself and not in your code. If it's in your code, post rather a question
    • if you pass this step, you still have to prove/explain what the issue is (and if you can provide fixes, it's even better)

    When you post a question: well, most of the above apply too x)

    When you post code, use proper github markdown, so that it's readable.




    Closing the "issue" aspect & cheers

  • Custom User Avatar

    The "Attempt" tests don't seem to work from Test.expect(lt.get_points("Liverpool") == 1, "Nope!")
    My code seems to work okay for the full test scenario (I called each method manually and checked the result), but I don't pass the above test, frustating :P
    Can you recheck your test and correct if necessary?

    Above test error message:

    Man Utd should now have 1 win, 1 draw and 0 losses.
    Nope! -  Expected: 1, instead got: nil
    

    And below my test results for each method:

    Test Results:
     Log
    3
    3
    0
    0
    3
    -3
    4
    4
    1  #=> this is the result of the methid call that return "nil" according the above error message, as you can see, it definitely returns 1!
    1
    4
    -3
    
  • Custom User Avatar

    Fixed.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    C++ translation. Please, review and approve (the author is inactive).

  • Custom User Avatar

    Yep, it's now fixed

  • Custom User Avatar

    Sorry, it's now fixed!

  • Loading more items...