Skip to content

Commit b6f7eee

Browse files
committed
Update Kotlin tests (now without semicolons)
1 parent 9514488 commit b6f7eee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+550
-550
lines changed

plugins/kotlin/testData/results/pkg/TestAnyType.dec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package pkg
33
public class TestAnyType {
44
public fun test(param: Any): Int {
55
if (param is java.lang.String) {// 5
6-
return (param as java.lang.String).length();// 6
6+
return (param as java.lang.String).length()// 6
77
} else {
8-
System.out.println(param);// 9
9-
return 0;// 11
8+
System.out.println(param)// 9
9+
return 0// 11
1010
}
1111
}
1212
}

plugins/kotlin/testData/results/pkg/TestBitwiseFunctions.dec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ package pkg
22

33
public class TestBitwiseFunctions {
44
public fun and(a: Int, b: Int): Int {
5-
return a and b;// 5
5+
return a and b// 5
66
}
77

88
public fun or(a: Int, b: Int): Int {
9-
return a or b;// 9
9+
return a or b// 9
1010
}
1111

1212
public fun xor(a: Int, b: Int): Int {
13-
return a xor b;// 13
13+
return a xor b// 13
1414
}
1515

1616
public fun shl(a: Int, b: Int): Int {
17-
return a shl b;// 17
17+
return a shl b// 17
1818
}
1919

2020
public fun shr(a: Int, b: Int): Int {
21-
return a shr b;// 21
21+
return a shr b// 21
2222
}
2323

2424
public fun ushr(a: Int, b: Int): Int {
25-
return a ushr b;// 25
25+
return a ushr b// 25
2626
}
2727
}
2828

plugins/kotlin/testData/results/pkg/TestClassDec.dec

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package pkg
22

33
public class TestClassDec {
44
public fun pkg.TestClassDec.Vec2iVal.dot(v: pkg.TestClassDec.Vec2iVal): Int {
5-
return `$this$dot`.getX() * v.getX() + `$this$dot`.getY() * v.getY();// 11
5+
return `$this$dot`.getX() * v.getX() + `$this$dot`.getY() * v.getY()// 11
66
}
77

88
public fun test() {
9-
new TestClassDec.EmptyDec();
10-
val vec: TestClassDec.Vec2iVal = new TestClassDec.Vec2iVal(1, 2);// 16
11-
val vec1: TestClassDec.Vec2iVal = new TestClassDec.Vec2iVal(2, 4);// 17
12-
System.out.println(vec.getX());// 19
13-
System.out.println(this.dot(vec, vec1));// 20
9+
new TestClassDec.EmptyDec()
10+
val vec: TestClassDec.Vec2iVal = new TestClassDec.Vec2iVal(1, 2)// 16
11+
val vec1: TestClassDec.Vec2iVal = new TestClassDec.Vec2iVal(2, 4)// 17
12+
System.out.println(vec.getX())// 19
13+
System.out.println(this.dot(vec, vec1))// 20
1414
}// 21
1515

1616
public class EmptyDec
@@ -22,8 +22,8 @@ public class TestClassDec {
2222
public final val y: Int
2323

2424
init {
25-
this.x = x;// 7
26-
this.y = y;
25+
this.x = x// 7
26+
this.y = y
2727
}
2828
}
2929

@@ -35,8 +35,8 @@ public class TestClassDec {
3535
internal set
3636

3737
init {
38-
this.x = x;// 6
39-
this.y = y;
38+
this.x = x// 6
39+
this.y = y
4040
}
4141
}
4242
}

plugins/kotlin/testData/results/pkg/TestClassicStringInterpolation.dec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ public class TestClassicStringInterpolation {
44
public final val x: Int = 5
55

66
public fun stringInterpolation(x: Int, y: String) {
7-
System.out.println("$x $y");// 5
7+
System.out.println("$x $y")// 5
88
}// 6
99

1010
public fun testConstant(x: Int) {
11-
System.out.println("$x 5");// 9
11+
System.out.println("$x 5")// 9
1212
}// 10
1313

1414
public fun testExpression(x: Int) {
15-
System.out.println("$x ${x + 1}");// 13
15+
System.out.println("$x ${x + 1}")// 13
1616
}// 14
1717

1818
public fun testProperty() {
19-
System.out.println("${this.x}!");// 18
19+
System.out.println("${this.x}!")// 18
2020
}// 19
2121

2222
public fun testLiteralClass() {
23-
System.out.println("${TestClassicStringInterpolation::class.java}!");// 22
23+
System.out.println("${TestClassicStringInterpolation::class.java}!")// 22
2424
}// 23
2525
}
2626

plugins/kotlin/testData/results/pkg/TestCompanionObject.dec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ package pkg
22

33
public class TestCompanionObject {
44
public fun notInCompanion() {
5-
System.out.println("notInCompanion");// 5
5+
System.out.println("notInCompanion")// 5
66
}// 6
77

88
@JvmStatic
99
@JvmSynthetic
1010
fun `access$getCompanionVal$cp`(): java.lang.String {
11-
return companionVal;
11+
return companionVal
1212
}
1313

1414
@JvmStatic
1515
@JvmSynthetic
1616
fun `access$getCompanionValJvmStatic$cp`(): java.lang.String {
17-
return companionValJvmStatic;// 3
17+
return companionValJvmStatic// 3
1818
}
1919

2020
public companion object {
@@ -24,11 +24,11 @@ public class TestCompanionObject {
2424
public final val companionValJvmStatic: String
2525

2626
public fun inCompanion() {
27-
System.out.println("inCompanion");// 15
27+
System.out.println("inCompanion")// 15
2828
}// 16
2929

3030
public fun inCompanionJvmStatic() {
31-
System.out.println("inCompanionJvmStatic");// 20
31+
System.out.println("inCompanionJvmStatic")// 20
3232
}// 21
3333
}
3434
}

plugins/kotlin/testData/results/pkg/TestComparison.dec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ package pkg
22

33
public class TestComparison {
44
public fun test2(a: Any, b: Any): Boolean {
5-
return a == b;// 5
5+
return a == b// 5
66
}
77

88
public fun test3(a: Any, b: Any): Boolean {
9-
return a === b;// 9
9+
return a === b// 9
1010
}
1111

1212
public fun testNull2(a: Any?): Boolean {
13-
return a == null;// 13
13+
return a == null// 13
1414
}
1515

1616
public fun testNull3(a: Any?): Boolean {
17-
return a == null;// 17
17+
return a == null// 17
1818
}
1919

2020
public fun testNullDouble2(a: Any?, b: Any?): Boolean {
21-
return a == b;// 21
21+
return a == b// 21
2222
}
2323

2424
public fun testNullDouble3(a: Any?, b: Any?): Boolean {
25-
return a === b;// 25
25+
return a === b// 25
2626
}
2727
}
2828

plugins/kotlin/testData/results/pkg/TestCompileTimeErrors.dec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ package pkg
22

33
public class TestCompileTimeErrors {
44
public fun <I, O> test(i: I): O where O : I, O : pkg.TestCompileTimeErrors.Test {
5-
throw new NotImplementedError(null, 1, null);// 10
5+
throw new NotImplementedError(null, 1, null)// 10
66
}
77

88
public fun test2(i: Int?): pkg.TestCompileTimeErrors.Test? {
99
return if (i == null) null else new TestCompileTimeErrors.Test(i) {
1010
private final Integer testValue;
1111

1212
{
13-
this.testValue = `$i`;// 16
13+
this.testValue = `$i`// 16
1414
}// 14
1515

1616
public Integer getTestValue() {
17-
return this.testValue;// 15
17+
return this.testValue// 15
1818
}
1919

2020
/** @deprecated */
2121
// $VF: synthetic method
2222
public static void getTestValue$annotations() {
2323
}
24-
};
24+
}
2525
}
2626

2727
public interface Test {

plugins/kotlin/testData/results/pkg/TestConstructors.dec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package pkg
22

33
public class TestConstructors private constructor() {
44
public constructor(a: Int) : this() {// 4
5-
System.out.println("a = $a");// 5
5+
System.out.println("a = $a")// 5
66
}// 6
77

88
public constructor(a: Int, b: Int) : this(a) {// 8
9-
System.out.println("b = $b");// 9
9+
System.out.println("b = $b")// 9
1010
}// 10
1111
}
1212

plugins/kotlin/testData/results/pkg/TestContracts.dec

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public class TestContracts {
1111
}
1212

1313
if (x == null) {// 13
14-
throw new IllegalStateException("x is null".toString());
14+
throw new IllegalStateException("x is null".toString())
1515
} else {
16-
return x;// 14
16+
return x// 14
1717
}
1818
}
1919

@@ -24,7 +24,7 @@ public class TestContracts {
2424
returns(false) implies ((a && !b || (!a && b)
2525
}
2626

27-
return if (a && b) null else a || b;// 24
27+
return if (a && b) null else a || b// 24
2828
}
2929

3030
public fun testTypeContract(x: Any?): Int {
@@ -33,9 +33,9 @@ public class TestContracts {
3333
}
3434

3535
if (x !is Int) {// 31
36-
throw new IllegalStateException("x is not Int".toString());
36+
throw new IllegalStateException("x is not Int".toString())
3737
} else {
38-
return (x as java.lang.Number).intValue();// 32
38+
return (x as java.lang.Number).intValue()// 32
3939
}
4040
}
4141

@@ -44,32 +44,32 @@ public class TestContracts {
4444
callsInPlace(f, InvocationKind.EXACTLY_ONCE)
4545
}
4646

47-
return (f.invoke() as java.lang.Number).intValue();// 39
47+
return (f.invoke() as java.lang.Number).intValue()// 39
4848
}
4949

5050
public fun testFunctionalContract2(f: () -> Int, b: Boolean): Int {
5151
contract {
5252
callsInPlace(f, InvocationKind.AT_MOST_ONCE)
5353
}
5454

55-
return if (b) (f.invoke() as java.lang.Number).intValue() else 0;// 46
55+
return if (b) (f.invoke() as java.lang.Number).intValue() else 0// 46
5656
}
5757

5858
public fun testFunctionalContract3(f: () -> Int, i: Int): Int {
5959
contract {
6060
callsInPlace(f)
6161
}
6262

63-
val var3: java.lang.Iterable = (new IntRange(0, i)) as java.lang.Iterable;
64-
var var4: Int = 0;
65-
val var5: java.util.Iterator = var3.iterator();
63+
val var3: java.lang.Iterable = (new IntRange(0, i)) as java.lang.Iterable
64+
var var4: Int = 0
65+
val var5: java.util.Iterator = var3.iterator()
6666

6767
while (var5.hasNext()) {
68-
val var6: Int = (var5 as IntIterator).nextInt();
69-
var4 += (f.invoke() as java.lang.Number).intValue();
68+
val var6: Int = (var5 as IntIterator).nextInt()
69+
var4 += (f.invoke() as java.lang.Number).intValue()
7070
}
7171

72-
return var4;// 53
72+
return var4// 53
7373
}
7474
}
7575

plugins/kotlin/testData/results/pkg/TestConvertedK2JOps.dec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class TestConvertedK2JOps {
77
public final val any: Any = new Object()
88

99
public fun codeConstructs() {
10-
System.out.println("Hello, world!");// 10
10+
System.out.println("Hello, world!")// 10
1111
}// 12
1212
}
1313

0 commit comments

Comments
 (0)