-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Convert Sched2Test to Kotlin #11802
Convert Sched2Test to Kotlin #11802
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine w/two cleanup annotation questions - one definite, one I asked David on. Happy to see this go in quickly to keep from blocking progress, cleanups are minor points
assertThat("Repeating single step - 20 minutes * 1.5", two, is(1800L)); // 30 mins | ||
assertThat("Good should take the reduced interval (25 * 0.7)", three, is(1468800L)); // 17 days | ||
assertThat("Easy should have a bonus day over good", four, is(1555200L)); // 18 days | ||
MatcherAssert.assertThat(after.type, Matchers.`is`(Consts.CARD_TYPE_RELEARNING)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KotlinCleanup is
note.setItem("Back", "two") | ||
col.addNote(note) | ||
col.reset() | ||
Assert.assertEquals(1, col.sched.newCount().toLong()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@david-allison I seem to recall other KotlinCleanups around toLong? is there one needed for this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with one issue. Add a kotlin cleanup on the SchedV2Test class:
@KotlinCleanup("fix ide lint issue and improve kotlin code where possible")
com.ichi2.libanki.sched.SchedV2Test
com.ichi2.libanki.sched.SchedV2Test
Done |
Useful for the backend work I'm working on