fix tests in org.jetbrains.kotlin.js.test.semantics

This commit is contained in:
Michael Nedzelsky
2015-09-07 22:21:52 +03:00
parent aa44606663
commit f6892580f6
57 changed files with 167 additions and 167 deletions
@@ -3,9 +3,9 @@ package foo
// CHECK_NOT_CALLED_IN_SCOPE: scope=test function=even
// CHECK_NOT_CALLED_IN_SCOPE: scope=test function=filter_azvtw4$
fun even(x: Int) = x % 2 == 0
internal fun even(x: Int) = x % 2 == 0
fun test(a: List<Int>) = a.filter(::even)
internal fun test(a: List<Int>) = a.filter(::even)
fun box(): String {
assertEquals(listOf(2, 4), test(listOf(1, 2, 3, 4)))
+1 -1
View File
@@ -2,7 +2,7 @@ package foo
// CHECK_CONTAINS_NO_CALLS: test
fun test(a: Int, b: Int): Int {
internal fun test(a: Int, b: Int): Int {
var c = 0
b.times {
@@ -2,7 +2,7 @@ package foo
// CHECK_CONTAINS_NO_CALLS: test
fun test(a: Int, b: Int): Int {
internal fun test(a: Int, b: Int): Int {
var res = 0
with (a + b) {
@@ -2,7 +2,7 @@ package foo
// CHECK_CONTAINS_NO_CALLS: test
fun test(x: Int, y: Int): Int =
internal fun test(x: Int, y: Int): Int =
with (x + x) {
val xx = this
+2 -2
View File
@@ -2,9 +2,9 @@ package foo
// CHECK_CONTAINS_NO_CALLS: test
var counter = 0
internal var counter = 0
fun test(a: Int) {
internal fun test(a: Int) {
a.times {
counter += 1
}
@@ -3,15 +3,15 @@ package foo
// CHECK_CONTAINS_NO_CALLS: testImplicitThis
// CHECK_CONTAINS_NO_CALLS: testExplicitThis
class A(var value: Int)
internal class A(var value: Int)
fun testImplicitThis(a: A, newValue: Int) {
internal fun testImplicitThis(a: A, newValue: Int) {
with (a) {
value = newValue
}
}
fun testExplicitThis(a: A, newValue: Int) {
internal fun testExplicitThis(a: A, newValue: Int) {
with (a) {
this.value = newValue
}