Ad
  • Custom User Avatar

    Yeah I just found this out. I am talking to an admin right now. Hopefully we can get something working soon.

  • Custom User Avatar

    That makes sense, thanks!

    So in the Java test cases for that Kata, when "assertEquals" fails, it is spitting out expected: but was: instead of the actual values. Someone was helping me debug it, and it seems to work outside of codewars, so there is a bug in there somewhere. He then suggested that changing "assertEquals" to assertThat("result", is("expected")); might fix it, which is what I was about to try.

    It's not a huge deal either way, it's just been very frustrating for the users trying to do the Java version.

  • Custom User Avatar

    It says I can no longer edit the test cases in one of my Kata. Is there a way I can re-enable editing?

    http://www.codewars.com/kata/caffeine-script/discuss

  • Custom User Avatar

    It says I can no longer edit the test cases o.O

    I will submit a ticket.

  • Custom User Avatar

    It's definitely your code, not the test. Sorry!

  • Custom User Avatar

    Yeah the single 'e' was me trying to test someone else's solution. Since you were able to run it successfully outside of codewars, I will try to check how to more properly implement Java tests here, maybe that's where the issue is, or maybe its a bug in codewars.

    Thanks for the reply!

  • Custom User Avatar

    In my CaffeineScript Kata, Junit's assertEquals is printing out expected: but was: if comparison between 2 strings fails. I am not sure why this is happening. Can anyone help?
    (see the Kata's discussion for more details: http://www.codewars.com/kata/caffeine-script/discuss)

  • Custom User Avatar

    RE: expected: but was: (Java)

    Many of you have reported seeing this failed test message in the Java version of this kata. I have done a little bit of investigating, but I still do not know why it is happening. I am using junit's assertEquals to compare the two strings (the first being what is expected, and the second being what you return).

    assertEquals("CoffeeScript", CaffeineBuzz.caffeineBuzz(12));
    

    If the right does not equal the left, it prints out the empty error message and not the actual strings themselves, which is very frustrating. However, if I give it a literal string, it will print the desired error message:

    // test
    assertEquals("CoffeeScript", "derp");
    
    // output
    expected:<[CoffeeScript]> but was:<[derp]>
    

    Does anyone know why this is happening?

  • Custom User Avatar

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

  • Custom User Avatar

    It seems the tests print out that message when you return an empty string. It's probably some string comparing issue, but I'm not sure. I'm not a java expert, and I am definitely not familiar with how junit works on codewars.

    The reason your code is generating this error this error is because your code almost always returns an empty string. You might want to go back and debug a little more :)

  • Custom User Avatar

    This test error message was also reported by another user, but I haven't been able to replicate it yet. Would you mind sharing what code you have? You can mark the comment as a spoiler and it will stay hidden.

  • Custom User Avatar

    Take another look at which digits you are supposed to be doubling ;)

  • Custom User Avatar

    I do not believe it is bugged. Based on the test output you gave, you are returing a list of characters, not integers.

    I can't debug it either way if I don't know what language you are using or what your code looks like. Would you mind sharing? You can mark the message as having spoiler content and it should be hidden.

  • Custom User Avatar

    That error IS strange. Unfortunately I have no idea what to debug. Can you please share your code? You can mark it as a spoiler and it should stay hidden.

  • Custom User Avatar
  • Loading more items...