Change Signature: Run tests with Kotlin stdlib
This commit is contained in:
@@ -75,9 +75,13 @@ public class ConfigLibraryUtil {
|
|||||||
PathUtil.getKotlinPathsForDistDirectory().getJsStdLibJarPath()), module);
|
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) {
|
public static void unConfigureKotlinRuntimeAndSdk(Module module, Sdk sdk) {
|
||||||
configureSdk(module, sdk);
|
configureSdk(module, sdk);
|
||||||
removeLibrary(module, DEFAULT_JAVA_RUNTIME_LIB_NAME);
|
unConfigureKotlinRuntime(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void unConfigureKotlinJsRuntimeAndSdk(Module module, Sdk sdk) {
|
public static void unConfigureKotlinJsRuntimeAndSdk(Module module, Sdk sdk) {
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
foo("1", 2)
|
foo("1", 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
A(3).foo("1", 2)
|
A(3).foo("1", 2)
|
||||||
with(A(3)) {
|
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 class A {
|
||||||
open var String.p: Int = 1
|
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 class A {
|
||||||
open var <caret>p: Int = 1
|
open var <caret>p: Int = 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
open var <caret>A.p: Int
|
open var <caret>A.p: Int
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
open var <caret>p: Int
|
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 class A {
|
||||||
open var s: String = 1
|
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 class A {
|
||||||
open var <caret>p: Int = 1
|
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 class A {
|
||||||
open var Int.<caret>p: Int = 1
|
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 class A {
|
||||||
open var String.<caret>p: Int = 1
|
open var String.<caret>p: Int = 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
"1".foo(X(0), 2)
|
"1".foo(X(0), 2)
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
open var String.<caret>p: Int
|
open var String.<caret>p: Int
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
open var A.<caret>p: Int
|
open var A.<caret>p: Int
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
foo(X(0), "1", 2)
|
foo(X(0), "1", 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
foo("1", X(0), 2)
|
foo("1", X(0), 2)
|
||||||
|
|||||||
Vendored
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
A(3).foo(X(0), "1", 2)
|
A(3).foo(X(0), "1", 2)
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ fun <caret>foo(x: X, s: String, k: Int): Boolean {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
foo(X(0), "1", 2)
|
foo(X(0), "1", 2)
|
||||||
with(X(0)) {
|
with(X(0)) {
|
||||||
|
|||||||
-2
@@ -4,8 +4,6 @@ fun X.<caret>foo(s: String, k: Int): Boolean {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
with(X(0)) {
|
with(X(0)) {
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ fun <caret>foo(s: String, x: X, k: Int): Boolean {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
foo("1", X(0), 2)
|
foo("1", X(0), 2)
|
||||||
with(X(0)) {
|
with(X(0)) {
|
||||||
|
|||||||
-2
@@ -4,8 +4,6 @@ fun X.<caret>foo(s: String, k: Int): Boolean {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
with(X(0)) {
|
with(X(0)) {
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
foo(X(0), "1", 2)
|
foo(X(0), "1", 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
foo("1", X(0), 2)
|
foo("1", X(0), 2)
|
||||||
|
|||||||
-2
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
fun String.foo() {
|
fun String.foo() {
|
||||||
with(1) {
|
with(1) {
|
||||||
|
|||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
fun <caret>foo(s: String) {
|
fun <caret>foo(s: String) {
|
||||||
with(1) {
|
with(1) {
|
||||||
|
|||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
fun foo(s: String) {
|
fun foo(s: String) {
|
||||||
with(1) {
|
with(1) {
|
||||||
|
|||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
fun String.<caret>foo() {
|
fun String.<caret>foo() {
|
||||||
with(1) {
|
with(1) {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
open class A {
|
open class A {
|
||||||
open var p: Int = 1
|
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 class A {
|
||||||
open var String.<caret>p: Int = 1
|
open var String.<caret>p: Int = 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ fun foo(s: String, k: Int): Boolean {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(X(0)) {
|
with(X(0)) {
|
||||||
foo("1", 2)
|
foo("1", 2)
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ fun X.<caret>foo(s: String, k: Int): Boolean {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(X(0)) {
|
with(X(0)) {
|
||||||
foo("1", 2)
|
foo("1", 2)
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
foo("1", 2)
|
foo("1", 2)
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class A(val k: Int) {
|
|||||||
|
|
||||||
class X(val k: Int)
|
class X(val k: Int)
|
||||||
|
|
||||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
with(A(3)) {
|
with(A(3)) {
|
||||||
X(0).foo("1", 2)
|
X(0).foo("1", 2)
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
open var <caret>p: Int
|
open var <caret>p: Int
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
|
||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
open var A.<caret>p: Int
|
open var A.<caret>p: Int
|
||||||
|
|||||||
+4
-1
@@ -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.refactoring.changeSignature.ui.KotlinMethodNode;
|
||||||
import org.jetbrains.kotlin.idea.stubindex.JetFullClassNameIndex;
|
import org.jetbrains.kotlin.idea.stubindex.JetFullClassNameIndex;
|
||||||
import org.jetbrains.kotlin.idea.stubindex.JetTopLevelFunctionFqnNameIndex;
|
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.DirectiveBasedActionUtils;
|
||||||
import org.jetbrains.kotlin.idea.test.KotlinCodeInsightTestCase;
|
import org.jetbrains.kotlin.idea.test.KotlinCodeInsightTestCase;
|
||||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||||
@@ -1348,13 +1349,15 @@ public class JetChangeSignatureTest extends KotlinCodeInsightTestCase {
|
|||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
editors = new ArrayList<Editor>();
|
editors = new ArrayList<Editor>();
|
||||||
|
ConfigLibraryUtil.configureKotlinRuntime(getModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
super.tearDown();
|
ConfigLibraryUtil.unConfigureKotlinRuntime(getModule());
|
||||||
editors.clear();
|
editors.clear();
|
||||||
editors = null;
|
editors = null;
|
||||||
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user