Ad
  • Custom User Avatar

    @JohanWiltink thank you!

  • Custom User Avatar

    @Larissa Have a look. I did for JS what I did for Haskell, mostly. I may have forgotten a failure message here or there, but I think I've done adequate custom messages where the default was not enough ( sometimes it is ).

  • Custom User Avatar

    I'll fix up the JS version some more. I can't do that for Python unfortunately, I don't know enough Python.

  • Custom User Avatar

    There is a difference between 21 and black jack. The test cases are correct. [10, 11] beats [5, 5, 11]

    This is stated in the description:
    "-Get 21 points on your first two cards (called a blackjack), without a dealer blackjack;"

  • Custom User Avatar

    @JohanWiltink, Thanks for your help, it was much harder than it seemed at first. I will be grateful to you if you help bring everything to a successful conclusion.

  • Custom User Avatar

    Please ask for confirmation that the problem is actually solved before closing issues. You had not solved the issue this user was experiencing. And he really was experiencing an issue.

  • Custom User Avatar

    After factoring out the validation function, it should really also be used for the basic tests. Those are ( still ) a mess.

  • Custom User Avatar

    The JS tests actually did have major problems Larissa. Whenever the expected value was not null one of two wrong tests ( boys and girls count were switched ) failed, was caught, and failed the user solution with a generic failure message.

    I've done some cleaning up, and things should more or less work now. It can still be done cleaner.

    It can also be used for Example tests if you factor out the checking function, don't use that for null results ( and take that logic out ) and directly test for null when appropriate ( that way you don't give away any logic ). There is no need for a reference solution at all except to give a possible solution on failing tests; I think that should still be put back into the failure messages for the current tests. But I wanted correct tests first.

  • Custom User Avatar

    random tests test your solution and do not check for an exact match with any particular result. In the tests, it is checked that a string of the desired length is created, that the letters G and B are placed in the order that corresponds to the condition of the problem.

  • Custom User Avatar

    ( Assuming JavaScript. This sh!t can be language-dependent - it helps if you say in which language you're having an issue. )

    That's what it says, but it's not what it does. The real problem is catching the AssertionErrors testing is throwing. You're trying to be too smart, author.

  • Custom User Avatar

    oh my goodness, I'm definitely not a fan of any of my 3 years old code.