kotlin-koans
kotlin-koans copied to clipboard
N25ComparisonKtTest not testing proper comaprison
First of all let me say these koans are a great way to learn the language, thank you! Now to get to the minor issue, the three tests in the N25ComparisonKtTest does not test for the fact that the max of January is less than max of Februari the same year if it is not a leap year. My recommendation would be adding an extra test function like:
@Test fun testMaxJanuaryBeforeMaxFebruaryNotLeapYear() {
val first = MyDate(2015, 1, 31)
val second = MyDate(2015, 2, 28)
assertTrue("The date ${first.s} should be before ${second.s}", first < second)
}