Reuse JVM box tests for binary operations in JS, excluding those that can't pass now.

This commit is contained in:
Ilya Gorbunov
2016-10-21 04:19:39 +03:00
parent 19922135fd
commit 98f7c61333
7 changed files with 153 additions and 0 deletions
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
// reason - multifile tests are not supported in JS tests
//FILE: Holder.java
class Holder {
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
// reason - multifile tests are not supported in JS tests
//FILE: JavaClass.java
class JavaClass {
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
// reason - no ArithmeticException in JS
fun box(): String {
val a1 = 0
val a2 = try { 1 / 0 } catch(e: ArithmeticException) { 0 }
+2
View File
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
// reason - Int doesn't overflow in JS, TODO: include after KT-7733 is fixed
fun box(): String {
val i1: Int = Int.MAX_VALUE
val i2 = i1 + 1