Files
kotlin-fork/compiler/testData/codegen/box/operatorConventions/oldLanguageVersions/percentAsModOnBigIntegerWithoutRem.kt
T
Kristoffer Andersen 8af3b3e51e [Backend] Reorganize version 1.0 codegen tests
- Extract all backend codegen tests that specifically target behaviour
  in to-be-deprecated functionality from language versions < 1.3"
- Remove those tests from the JVM IR test suite.
2019-10-24 16:51:19 +02:00

12 lines
302 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitOperatorMod
// !API_VERSION: 1.0
// TARGET_BACKEND: JVM
// FULL_JDK
import java.math.BigInteger
fun box(): String {
val m = BigInteger.valueOf(-2) % BigInteger.valueOf(3)
return if (m != BigInteger.valueOf(1)) "Fail: BigInteger(-2) mod BigInteger(3) == $m" else "OK"
}