Fixes for tests about mod
#KT-25217
This commit is contained in:
@@ -43,7 +43,7 @@ public inline operator fun BigDecimal.div(other: BigDecimal): BigDecimal = this.
|
||||
* Enables the use of the `%` operator for [BigDecimal] instances.
|
||||
*/
|
||||
@kotlin.internal.InlineOnly
|
||||
@Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING)
|
||||
@Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.ERROR)
|
||||
public inline operator fun BigDecimal.mod(other: BigDecimal): BigDecimal = this.remainder(other)
|
||||
|
||||
/**
|
||||
|
||||
@@ -72,7 +72,7 @@ class BigNumbersTest {
|
||||
assertEquals(BigDecimal("2"), BigDecimal("4") / a)
|
||||
assertEquals(BigDecimal("-2"), -a)
|
||||
assertEquals(BigDecimal("-2"), -a % b)
|
||||
assertEquals(BigDecimal("-2"), (-a).mod(b))
|
||||
assertEquals(BigDecimal("-2"), @Suppress("DEPRECATION_ERROR") (-a).mod(b))
|
||||
assertEquals(BigDecimal("-2"), (-a).rem(b))
|
||||
|
||||
assertEquals(BigDecimal("3"), a.inc())
|
||||
|
||||
Reference in New Issue
Block a user