fix tests in org.jetbrains.kotlin.js.test.semantics
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(s: String): String = log(s + ";")
|
||||
internal fun test(s: String): String = log(s + ";")
|
||||
|
||||
fun box(): String {
|
||||
assertEquals("a;", test("a"))
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun multiplyBy2(x: Int): Int = x * 2
|
||||
internal fun multiplyBy2(x: Int): Int = x * 2
|
||||
|
||||
fun test(x: Int): Int = apply(x, ::multiplyBy2)
|
||||
internal fun test(x: Int): Int = apply(x, ::multiplyBy2)
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(6, test(3))
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(x: Int, y: Int): Int = utils.sum(x, y)
|
||||
internal fun test(x: Int, y: Int): Int = utils.sum(x, y)
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(3, test(1, 2))
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
class A(val n: Int)
|
||||
internal class A(val n: Int)
|
||||
|
||||
fun test(a: A, m: Int): Int = apply(a) { n * m }
|
||||
internal fun test(a: A, m: Int): Int = apply(a) { n * m }
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(6, test(A(2), 3))
|
||||
|
||||
@@ -2,7 +2,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(x: Int): Int = apply(x) { it * 2 }
|
||||
internal fun test(x: Int): Int = apply(x) { it * 2 }
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(6, test(3))
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import utils.*
|
||||
|
||||
fun test(x: Int): Int = apply(x) { it * 2 }
|
||||
internal fun test(x: Int): Int = apply(x) { it * 2 }
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(6, test(3))
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(x: Int, y: Int): Int = apply(x) { it + y }
|
||||
internal fun test(x: Int, y: Int): Int = apply(x) { it + y }
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(3, test(1, 2))
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(x: Int, y: Int): Int = apply(x) { it + 1 } * y
|
||||
internal fun test(x: Int, y: Int): Int = apply(x) { it + 1 } * y
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(6, test(1, 3))
|
||||
|
||||
@@ -2,7 +2,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(a: A, y: Int): Int = a.plus(y)
|
||||
internal fun test(a: A, y: Int): Int = a.plus(y)
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(5, test(A(2), 3))
|
||||
|
||||
@@ -2,7 +2,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
fun test(x: Int, y: Int): Int = sum(x, y)
|
||||
internal fun test(x: Int, y: Int): Int = sum(x, y)
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(3, test(1, 2))
|
||||
|
||||
Reference in New Issue
Block a user