Change Signature: Run tests with Kotlin stdlib

This commit is contained in:
Alexey Sedunov
2015-10-29 16:15:06 +03:00
parent 4f09bdfe70
commit 6a72b51677
42 changed files with 9 additions and 82 deletions
@@ -75,9 +75,13 @@ public class ConfigLibraryUtil {
PathUtil.getKotlinPathsForDistDirectory().getJsStdLibJarPath()), module);
}
public static void unConfigureKotlinRuntime(Module module) {
removeLibrary(module, DEFAULT_JAVA_RUNTIME_LIB_NAME);
}
public static void unConfigureKotlinRuntimeAndSdk(Module module, Sdk sdk) {
configureSdk(module, sdk);
removeLibrary(module, DEFAULT_JAVA_RUNTIME_LIB_NAME);
unConfigureKotlinRuntime(module);
}
public static void unConfigureKotlinJsRuntimeAndSdk(Module module, Sdk sdk) {
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
A(3).foo("1", 2)
with(A(3)) {
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var String.p: Int = 1
}
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var <caret>p: Int = 1
}
@@ -1,7 +1,5 @@
package test
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class A
open var <caret>A.p: Int
@@ -1,7 +1,5 @@
package test
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class A
open var <caret>p: Int
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var s: String = 1
}
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var <caret>p: Int = 1
}
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var Int.<caret>p: Int = 1
}
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var String.<caret>p: Int = 1
}
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
"1".foo(X(0), 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -1,7 +1,5 @@
package test
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class A
open var String.<caret>p: Int
@@ -1,7 +1,5 @@
package test
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class A
open var A.<caret>p: Int
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo(X(0), "1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo("1", X(0), 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
A(3).foo(X(0), "1", 2)
with(A(3)) {
@@ -4,8 +4,6 @@ fun <caret>foo(x: X, s: String, k: Int): Boolean {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
foo(X(0), "1", 2)
with(X(0)) {
@@ -4,8 +4,6 @@ fun X.<caret>foo(s: String, k: Int): Boolean {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
X(0).foo("1", 2)
with(X(0)) {
@@ -4,8 +4,6 @@ fun <caret>foo(s: String, x: X, k: Int): Boolean {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
foo("1", X(0), 2)
with(X(0)) {
@@ -4,8 +4,6 @@ fun X.<caret>foo(s: String, k: Int): Boolean {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
X(0).foo("1", 2)
with(X(0)) {
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo(X(0), "1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo("1", X(0), 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class C {
fun String.foo() {
with(1) {
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class C {
fun <caret>foo(s: String) {
with(1) {
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class C {
fun foo(s: String) {
with(1) {
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class C {
fun String.<caret>foo() {
with(1) {
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var p: Int = 1
}
@@ -1,5 +1,3 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var String.<caret>p: Int = 1
}
@@ -4,8 +4,6 @@ fun foo(s: String, k: Int): Boolean {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(X(0)) {
foo("1", 2)
@@ -4,8 +4,6 @@ fun X.<caret>foo(s: String, k: Int): Boolean {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(X(0)) {
foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo("1", 2)
@@ -10,8 +10,6 @@ class A(val k: Int) {
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
X(0).foo("1", 2)
@@ -1,7 +1,5 @@
package test
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class A
open var <caret>p: Int
@@ -1,7 +1,5 @@
package test
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
class A
open var A.<caret>p: Int
@@ -47,6 +47,7 @@ import org.jetbrains.kotlin.idea.refactoring.JetRefactoringBundle;
import org.jetbrains.kotlin.idea.refactoring.changeSignature.ui.KotlinMethodNode;
import org.jetbrains.kotlin.idea.stubindex.JetFullClassNameIndex;
import org.jetbrains.kotlin.idea.stubindex.JetTopLevelFunctionFqnNameIndex;
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil;
import org.jetbrains.kotlin.idea.test.DirectiveBasedActionUtils;
import org.jetbrains.kotlin.idea.test.KotlinCodeInsightTestCase;
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
@@ -1348,13 +1349,15 @@ public class JetChangeSignatureTest extends KotlinCodeInsightTestCase {
protected void setUp() throws Exception {
super.setUp();
editors = new ArrayList<Editor>();
ConfigLibraryUtil.configureKotlinRuntime(getModule());
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ConfigLibraryUtil.unConfigureKotlinRuntime(getModule());
editors.clear();
editors = null;
super.tearDown();
}
@NotNull