-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors in: Leap #301
Comments
As a solution for 1), suggestion: Given a year, report if it is a leap year.
|
As a solution for 2), obviously: import org.junit.Test
import org.junit.Ignore
import kotlin.test.assertFalse
import kotlin.test.assertTrue
class LeapTest {
@Test
fun yearNotDivisibleBy4() {
assertFalse(Year(2015).isLeap)
}
@Test
fun yearDivisibleBy4NotDivisibleBy100() {
assertTrue(Year(1996).isLeap)
}
@Test
fun yearDivisibleBy100NotDivisibleBy400() {
assertFalse(Year(2100).isLeap)
}
@Test
fun yearDivisibleBy400() {
assertTrue(Year(2000).isLeap)
}
} |
In regards to #1, yes it is assumed that the user would use the test suite to answer those questions. There was a big discussion in this thread (exercism/exercism#856) about the philosophy. Hopefully this helps explain a bit about the dependence on the tests. |
I'm closing this issue for now. If the two discussions above don't solve this for you, please start a discussion here and we can try to find a solution together. |
I see the problem is larger than this specific test and must be addressed differently, so I've just given my thoughts from experience in the problem referenced above (#856) which seemed to be a more appropriate place to do so. Personally, I know how to proceed now so my own problem is solved already, but one may consider the chance that everyone starting the tests will hit the same wall... |
Thanks for taking the time to add your thoughts to #865...I'll track that one to see where Exercism as a whole ends up. |
Common problems also found in other tests.
=> the user has to guess what to do, from the test suite.
@Ignored
tags.=> test unreliable
The text was updated successfully, but these errors were encountered: