Ad
  • Custom User Avatar
    Log
    5:15 am
    Test Failed
      String lengths are both 4. Strings differ at index 2.
      Expected: "0505"
      But was:  "0515"
      -------------^
    

    Random tests sometimes expect the wrong result.

  • Default User Avatar

    nice kata but I don't understand the expected result:

    4:64 pm
    Test Failed
      Expected string length 4 but was 3. Strings differ at index 0.
      Expected: "1604"
      But was:  "NaN"
      -----------^
      
      language c#
    
  • Custom User Avatar

    How can you pass military time to regular? That RandomRegularToMilitaryTimeTests always returning wrong results.
    How Output of 07: 17 pm can be 19:17?
    RandomRegularToMilitaryTimeTests
    Log
    12:06 am
    11:61 pm
    11:51 pm
    10:12 pm
    7:17 pm
    Test Failed
    String lengths are both 4. Strings differ at index 2.
    Expected: "1907"
    But was: "1917"

  • Custom User Avatar

    There is an error in test cases:
    Your solution - public class MySolution {#region Solution public string Solution(string time)
    gives wrong result when converts regular to military time.

    Please, try this test cases:
    Assert.AreEqual("0333", converter.ConvertTime("3:33 am"));

    String lengths are both 4. Strings differ at index 2.
    Expected: "0333"
    But was: "0303"

    Assert.AreEqual("NaN", converter.ConvertTime("23:33 am"));

    Expected string length 3 but was 4. Strings differ at index 0.
    Expected: "NaN"
    But was: "1133"

  • Custom User Avatar

    Rounding is:

    • a bad thing, as it is usually a (very bad) workaround for precision issues people do not know how to handle correctly,
    • unnecessary in this kind of tasks,
    • not tested, I do no rounding and still pass.
  • Custom User Avatar
  • Custom User Avatar

    Uhm ... you don't close an Issue until you have actually fixed it :(

  • Default User Avatar

    Thank you for the suggestions. This kata is mainly to train on two fundamentals, adding values and rounding decimals to a certain point. I will modify the kata to avoid the overused temperature conversion problem, and focus simply on the two fundamentals.

  • Custom User Avatar

    Issue summary:

    • No tests for edge cases (e.g. 0 degrees Celsius? -273 degrees Celsius? -273.15 degrees Celsius?)
    • No random tests
    • Kata is not novel and/or unique in any aspect - temperature conversion has been done to death on Codewars

    There are probably other issues as well, but those are the ones that I can think of off the top of my head.

  • Custom User Avatar

    Hi @whendon18,

    Welcome to the club of Kata authors! :D While you may be inclined to author a Kata whenever an idea pops up in your mind and publish it for the rest of the community to enjoy, you should be aware that published Kata are expected to meet strict expectations in order to pass the testing stage and leave Beta.

    Please do read through the article linked above before continuing on your journey of authoring Kata. We're looking forward to more Kata authored by you once you have read the article mentioned ;)

    Cheers,
    @donaldsebleung

  • Default User Avatar

    All fixed now! This is my first kata so im still figuring out all the nuances involved with it (I forgot to hit re-publish after modifying tests).

  • Custom User Avatar
    tests/Fixture.cs(13,61): error CS1026: ) expected
    tests/Fixture.cs(33,58): error CS1026: ) expected