Ad
  • Custom User Avatar

    There are no random tests.

  • Custom User Avatar

    Actual tests depends on user code to split the two parts into methods with specific names:

    src/test/java/BadHashTest.java:11: error: cannot find symbol
        assertEquals(32, crypto1.magicNum(""));
                                ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:16: error: cannot find symbol
        assertEquals(64, crypto1.magicNum("a"));
                                ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:21: error: cannot find symbol
        assertEquals(96, crypto1.magicNum(" "));
                                ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:26: error: cannot find symbol
        assertEquals(-848, crypto1.magicNum("Hi!"));
                                  ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:31: error: cannot find symbol
        assertEquals(-520, crypto1.magicNum("a "));
                                  ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:36: error: cannot find symbol
        assertEquals(32, crypto1.magicNum("  "));
                                ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:41: error: cannot find symbol
        assertEquals(344, crypto1.magicNum(" Yo, What's Good! - "));
                                 ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    src/test/java/BadHashTest.java:46: error: cannot find symbol
        assertEquals(56, crypto1.magicNum("2345afd"));
                                ^
      symbol:   method magicNum(String)
      location: variable crypto1 of type BadHash
    8 errors
    
  • Custom User Avatar

    This has to be one of the worst kata descriptions I've ever seen. Completely illegable.

  • Custom User Avatar
  • Default User Avatar

    thanks for kata.that was good.

  • Custom User Avatar

    Steps c and d are clearly the most difficult in the task ((NOT a) shift left by 2 bits)), I think the examples should give the expected value for c, not just for a and b.

    b := sum of every difference between the consecutive characters of the input : Does it mean "sum of difference of ascii values"?

  • Custom User Avatar
  • Default User Avatar

    I agree that the kata is misleading in step (b).

    The difference between two numbers is always a positive value.

    This is incorrect. A difference is the result of subtracting one number from another number. In the equation 5 - 7 = -2, -2 is the difference.

    But you're right: Step (b) should specify the direction of the subtraction operation.

  • Default User Avatar

    Using C.

    The description is incorrect/misleading. It states "b := sum of every difference between the consecutive characters of the input"
    The difference between two numbers is always a positive value. This kata requires you to take the higher index and subtract the lower index, e.g. str[1] - str[0], str[2] - str[1] and so forth. abs(str[1] - str[2]) will give you the difference between two numbers, but is incorrect here.

  • Custom User Avatar

    Approved.

  • Custom User Avatar

    Bumping translation.

  • Custom User Avatar

    Python translation. Please, review and approve (the author is not active anymore).

  • Default User Avatar

    Done

  • Default User Avatar

    Tests are fixed (I copied uniapi's test code).

  • Default User Avatar

    The NASM translation (which I approved an hour ago) has random tests. These random tests can be copied to the C translation without any changes.

  • Loading more items...