Fixes for tests about mod

#KT-25217
This commit is contained in:
Mikhail Zarechenskiy
2018-09-10 06:31:55 +03:00
parent dee3617dd8
commit 3431123cab
7 changed files with 77 additions and 77 deletions
@@ -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())