KT-2752: move tests, that check whether there's no name clash, to JS backend tests

This commit is contained in:
Alexey Andreev
2016-05-31 14:28:54 +03:00
parent 5ce158f297
commit 50dd1e31c3
26 changed files with 104 additions and 173 deletions
@@ -1,11 +0,0 @@
package foo
class A
class B
val A.foo: Int
get() = 32
val B.foo: Int
get() = 42
@@ -1,20 +0,0 @@
package
package foo {
public val foo.A.foo: kotlin.Int
public val foo.B.foo: kotlin.Int
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -1,8 +0,0 @@
package foo
class A
fun A.bar() = 32
val A.bar: Int
get() = 32
@@ -1,13 +0,0 @@
package
package foo {
public val foo.A.bar: kotlin.Int
public fun foo.A.bar(): kotlin.Int
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -1,5 +0,0 @@
package foo
@JsName("bar") fun foo(x: Int) = x
private fun bar() = 42
@@ -1,6 +0,0 @@
package
package foo {
private fun bar(): kotlin.Int
@kotlin.js.JsName(name = "bar") public fun foo(/*0*/ x: kotlin.Int): kotlin.Int
}
@@ -1,5 +0,0 @@
package foo
fun bar() = 23
private val bar = 32
@@ -1,6 +0,0 @@
package
package foo {
private val bar: kotlin.Int = 32
public fun bar(): kotlin.Int
}
@@ -1,11 +0,0 @@
// FILE: foo.kt
package foo
fun bar(x: Int) = x
// FILE: foobar.kt
package foo.bar
val x = 42
@@ -1,9 +0,0 @@
package
package foo {
public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
package foo.bar {
public val x: kotlin.Int = 42
}
}
@@ -1,13 +0,0 @@
// FILE: foo.kt
package foo
private fun bar() = 23
private val bar = 42
// FILE: foobar.kt
package foo.bar
val x = 42
@@ -1,10 +0,0 @@
package
package foo {
private val bar: kotlin.Int = 42
private fun bar(): kotlin.Int
package foo.bar {
public val x: kotlin.Int = 42
}
}
@@ -1,5 +0,0 @@
package foo
@native fun bar() = 23
val bar = 32
@@ -1,6 +0,0 @@
package
package foo {
public val bar: kotlin.Int = 32
@kotlin.js.native() public fun bar(): kotlin.Int
}
@@ -301,36 +301,18 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
doTest(fileName);
}
@TestMetadata("extensionPropertiesWithDifferentReceiversDoNotClash.kt")
public void testExtensionPropertiesWithDifferentReceiversDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertiesWithDifferentReceiversDoNotClash.kt");
doTest(fileName);
}
@TestMetadata("extensionPropertyAndMethod.kt")
public void testExtensionPropertyAndMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt");
doTest(fileName);
}
@TestMetadata("extensionPropertyAndMethodDoNotClash.kt")
public void testExtensionPropertyAndMethodDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethodDoNotClash.kt");
doTest(fileName);
}
@TestMetadata("jsNameAndOverridden.kt")
public void testJsNameAndOverridden() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt");
doTest(fileName);
}
@TestMetadata("jsNameAndPrivateDontClash.kt")
public void testJsNameAndPrivateDontClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndPrivateDontClash.kt");
doTest(fileName);
}
@TestMetadata("jsNameClash.kt")
public void testJsNameClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt");
@@ -349,30 +331,12 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
doTest(fileName);
}
@TestMetadata("methodAndPrivatePropertyDoNotClash.kt")
public void testMethodAndPrivatePropertyDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndPrivatePropertyDoNotClash.kt");
doTest(fileName);
}
@TestMetadata("packageAndMangledMethodDoNotClash.kt")
public void testPackageAndMangledMethodDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMangledMethodDoNotClash.kt");
doTest(fileName);
}
@TestMetadata("packageAndMethod.kt")
public void testPackageAndMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt");
doTest(fileName);
}
@TestMetadata("packageAndPrivateDeclarationsDoNotClash.kt")
public void testPackageAndPrivateDeclarationsDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndPrivateDeclarationsDoNotClash.kt");
doTest(fileName);
}
@TestMetadata("packageAndProperty.kt")
public void testPackageAndProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt");
@@ -391,12 +355,6 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
doTest(fileName);
}
@TestMetadata("propertyAndNativeMethodDoNotClash.kt")
public void testPropertyAndNativeMethodDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndNativeMethodDoNotClash.kt");
doTest(fileName);
}
@TestMetadata("topLevelMethodAndJsNameConstructor.kt")
public void testTopLevelMethodAndJsNameConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt");