Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

N25ComparisonKtTest not testing proper comaprison #144

Open
kkondratov opened this issue Apr 11, 2018 · 0 comments
Open

N25ComparisonKtTest not testing proper comaprison #144

kkondratov opened this issue Apr 11, 2018 · 0 comments

Comments

@kkondratov
Copy link

kkondratov commented Apr 11, 2018

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)
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant