K2JS: test that UNUSED_PARAM warnings inside native declarations and all warnings from stdlib was suppressed.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
$TESTDATA_DIR$/nativeDeclarations.kt
|
||||||
|
-output
|
||||||
|
$TEMP_DIR$/out.js
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
native
|
||||||
|
fun foo(a: String): Int = noImpl
|
||||||
|
|
||||||
|
native
|
||||||
|
class Bar(b: Int, c: Char) {
|
||||||
|
fun baz(d: Int) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
native
|
||||||
|
object Obj {
|
||||||
|
fun test1(e: String) {}
|
||||||
|
object Nested {
|
||||||
|
fun test2(g: Int) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
OK
|
||||||
@@ -191,6 +191,12 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
|
|||||||
doJsTest(fileName);
|
doJsTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nativeDeclarations.args")
|
||||||
|
public void testNativeDeclarations() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/nativeDeclarations.args");
|
||||||
|
doJsTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("outputPostfixFileNotFound.args")
|
@TestMetadata("outputPostfixFileNotFound.args")
|
||||||
public void testOutputPostfixFileNotFound() throws Exception {
|
public void testOutputPostfixFileNotFound() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputPostfixFileNotFound.args");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputPostfixFileNotFound.args");
|
||||||
|
|||||||
@@ -48,4 +48,11 @@ public class K2JsCliTest extends CliBaseTest {
|
|||||||
public void jsHelp() throws Exception {
|
public void jsHelp() throws Exception {
|
||||||
executeCompilerCompareOutputJS();
|
executeCompilerCompareOutputJS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void nativeDeclarations() throws Exception {
|
||||||
|
executeCompilerCompareOutputJS();
|
||||||
|
|
||||||
|
Assert.assertTrue(new File(tmpdir.getTmpDir(), "out.js").isFile());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user