Skip to content

Commit

Permalink
Suppress deprecations in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed Oct 18, 2024
1 parent 2db494c commit 388f02a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions core/common/test/DateTimePeriodTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,17 @@ class DateTimePeriodTest {

val dp1 = DatePeriod(years = 1, months = 6)

assertEquals(DateTimePeriod(years = 10, days = 3, hours = 2), p1 + p2 + p3)
assertEquals(DatePeriod(years = 11, months = 6), dp1 + p1)
assertEquals(DatePeriod(years = 2, months = 12), dp1 + dp1)
assertEquals(DateTimePeriod(years = 1, months = 6, days = 3), p2 + dp1)

val dp2 = dp1 + p3 + p4
assertEquals(dp1, dp2)
assertTrue(dp2 is DatePeriod)
@Suppress("DEPRECATION_ERROR")
run {
assertEquals(DateTimePeriod(years = 10, days = 3, hours = 2), p1 + p2 + p3)
assertEquals(DatePeriod(years = 11, months = 6), dp1 + p1)
assertEquals(DatePeriod(years = 2, months = 12), dp1 + dp1)
assertEquals(DateTimePeriod(years = 1, months = 6, days = 3), p2 + dp1)

val dp2 = dp1 + p3 + p4
assertEquals(dp1, dp2)
assertTrue(dp2 is DatePeriod)
}
}

@Test
Expand Down

0 comments on commit 388f02a

Please sign in to comment.