mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-22 08:13:54 +00:00
fixes in tests
This commit is contained in:
parent
c3ed1d024c
commit
fec17f949f
@ -28,10 +28,10 @@ internal class CommonNearDateTimeCalculator<T>(
|
||||
): Pair<DateTime, Boolean>? {
|
||||
val currentData = partGetter(relativelyTo)
|
||||
val greaterOrEquals = times.firstOrNull { it >= currentData }
|
||||
val newDateTime = if (greaterOrEquals == null) {
|
||||
partSetter(relativelyTo, times.first()) ?: return null
|
||||
} else {
|
||||
partSetter(relativelyTo, greaterOrEquals) ?: return null
|
||||
val newDateTime = when (greaterOrEquals) {
|
||||
null -> partSetter(relativelyTo, times.first()) ?: return null
|
||||
currentData -> relativelyTo
|
||||
else -> partSetter(relativelyTo, greaterOrEquals) ?: return null
|
||||
}
|
||||
return if (newDateTime == relativelyTo) {
|
||||
relativelyTo to false
|
||||
|
@ -80,7 +80,7 @@ class StringParseTest {
|
||||
}
|
||||
@Test
|
||||
fun testThatTimezoneCorrectlyDeserialized() {
|
||||
val now = DateTimeTz.nowLocal()
|
||||
val now = DateTime.now().copy(milliseconds = 0).local
|
||||
|
||||
runTest {
|
||||
for (i in 0 .. 1339) {
|
||||
|
Loading…
Reference in New Issue
Block a user