Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Random tests sometimes expect the wrong result.
nice kata but I don't understand the expected result:
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"
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"
Rounding is:
Uhm ... you don't close an Issue until you have actually fixed it :(
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.
Issue summary:
There are probably other issues as well, but those are the ones that I can think of off the top of my head.
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
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).