JS backend: add cli test for creating metadata and ant test for library with metadata

This commit is contained in:
Michael Nedzelsky
2015-01-20 18:36:14 +03:00
parent 0050c9888d
commit 33cdf8c969
10 changed files with 90 additions and 0 deletions
@@ -183,6 +183,12 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/js"), Pattern.compile("^(.+)\\.args$"), false);
}
@TestMetadata("createMetadata.args")
public void testCreateMetadata() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/createMetadata.args");
doJsTest(fileName);
}
@TestMetadata("diagnosticForClassLiteral.args")
public void testDiagnosticForClassLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticForClassLiteral.args");
@@ -70,6 +70,14 @@ public class K2JsCliTest extends CliBaseTest {
Assert.assertTrue(new File(tmpdir.getTmpDir(), "out.js").isFile());
}
@Test
public void createMetadata() throws Exception {
executeCompilerCompareOutputJS();
Assert.assertTrue(new File(tmpdir.getTmpDir(), "jslib-example.meta.js").isFile());
Assert.assertTrue(new File(tmpdir.getTmpDir(), "jslib-example.js").isFile());
}
@Test
public void libraryDirNotFound() throws Exception {
executeCompilerCompareOutputJS();