Ad
  • Default User Avatar
  • Default User Avatar

    @Mrityunjay Bhardwaj: It was me, who translated this kata to Java. As you can see below: There was a comment "Java-Translation kumited!"...

    There is no problem in the kata. (25 warriors did it in Java until this moment). And like dinglemause said it before: There is no biggertest for 1286608618.
    I tested it last minute, if such test would be succeed: Without problems with the solution.

    Have you you written the input value to the console for checking? Maybe your code changed a value in a wrong way?

  • Custom User Avatar

    Look a few comments down below: Steffen is the one who translated it and he has certainly a much better command of Java than me.

  • Default User Avatar

    @Mrityunjay Bhardwai.

    FYI - I have just moments ago successfully completed the Java version of this Kata. There are no problems at all.

    You said your code failed on a Java test called BiggerNumber with input of 1286608618.

    • But there is no such test in the Java JUnit. (For Java the test is called biggerTests)
    • And there is no such test input same as that either either

    So I don't know what you are looking at... but it not the current Java submission test cases

  • Default User Avatar

    @dinglemouse yes, maybe you are right.... but i dont have an authority to check the Junit tests complectely.... and @GiacomoSorbi i cant uderstant what do you mean by "Java translator comment" (do u mean the one who is a JAVA programmer and solved it before?) sorry i am new here.....

  • Default User Avatar

    @Mrityunjay Bhardwai, I know you think you are returning the correct result but it might be worth triple-checking that it's not you returning that -1. Sometimes the JUnit tests some of Katas are written wrong and the actual/expected values are reversed. It can lead to confusing situations like this.

    (Not saying that it the case here... but it might be)

  • Default User Avatar

    Because the input number is "1234567890"..... So the next number using the same digits should bE : "1234567908" But insted your code returns "1234567980 which is the second next biggest..... Not the "next" biggest!

    Hope it helps.... :)

  • Default User Avatar

    1234567980 should equal 1234567908
    But 123467908 is smaller than 1234567980. Why 1234567908 is next bigger number, when its smaller. My code can't pass the test.

  • Custom User Avatar

    I would post under the Java translator comment to ask for more direct support; sorry for the little help here.

  • Default User Avatar

    yes....thats exactly I am wondering...It maybe the fault in that "biggerTest" test in JAVA.
    but.... this KATA has been completed 23 times..... so it might be my fault... but all other test seams perfect...

    it would be great if you could diagnose this issue because i cant find any JAVA related help here.

  • Custom User Avatar

    Your tests seem correct, but do not get where you get the -1 expected result.

  • Default User Avatar

    thanks for your reply sir, I am also beginner in JAVA Anywyays So can you please clearify me wheather My tests are correct or not? Not Language a specific question (Running in a local mechine):-

    original Value : 1234567890;
    The next Value using the same digits: 1234567908

    original Value : 1286608618;
    The next Value using the same digits: 1286608681

    original Value : 123456789;
    The next Value using the same digits: 123456798

    If yes... then may i know why i am geting this error:-

    biggerTests(KataTests)
    Log
    123456789
    1234567890
    1286608618
    ✘ expected:<-1> but was:<1286608681>

    and apart from these 3 inputs i have cleared all my test (basic as well as randome ones);

    Thanks again

  • Custom User Avatar

    Thank you for your kind attention, the time spent on my katas and this kind feed; regrettably my Java is quite weak, so better luck writing under the post of the Java translator down below.

    Have a nice day :)

  • Default User Avatar

    I am using "JAVA"

    Greetings Sir.... First of all thankyou for making another great KATA (I sure am the fan of ur KATAs xD)

    Anyways.... After experiencing painfull hours of finding the solution... i finally did it!

    But i am facing some problem in that BiggerNumber category Test..(I passed all the random and basic test)

    the input is "1286608618" and my algorithem produce == "1286608681" which In my openion is the correct answer.

    But insted it shows me this error: ✘ expected:<-1> but was:<1286608681>

    I didnt know what is going wrong here....

    It would be great if you could guide me to resolve this issue....

    Thankyou for your Time in advance :D

  • Custom User Avatar

    Thank you for your polite feed; I assume you are using C, so you have definitely better luck posting under the comment of the translator in that language down below.

    Cheers.

  • Loading more items...