JS: added inline stdlib cases

This commit is contained in:
Alexey Tsvetkov
2015-03-04 17:47:23 +03:00
parent 38efec6886
commit 53dfd77d31
10 changed files with 263 additions and 0 deletions
@@ -0,0 +1,25 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.test.semantics;
import org.jetbrains.kotlin.js.test.AbstractSingleFileTranslationWithDirectivesTest;
public abstract class AbstractInlineJsStdlibTest extends AbstractSingleFileTranslationWithDirectivesTest {
public AbstractInlineJsStdlibTest() {
super("inlineStdlib/");
}
}
@@ -0,0 +1,80 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.test.semantics;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.InnerTestClasses;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.JetTestUtils;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("js/js.translator/testData/inlineStdlib/cases")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class InlineJsStdlibTestGenerated extends AbstractInlineJsStdlibTest {
public void testAllFilesPresentInCases() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/inlineStdlib/cases"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("callNameClash.kt")
public void testCallNameClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/callNameClash.kt");
doTest(fileName);
}
@TestMetadata("closure.kt")
public void testClosure() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/closure.kt");
doTest(fileName);
}
@TestMetadata("closureInObjectLiteral.kt")
public void testClosureInObjectLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/closureInObjectLiteral.kt");
doTest(fileName);
}
@TestMetadata("closureNested.kt")
public void testClosureNested() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/closureNested.kt");
doTest(fileName);
}
@TestMetadata("localNamesClash.kt")
public void testLocalNamesClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/localNamesClash.kt");
doTest(fileName);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/simple.kt");
doTest(fileName);
}
@TestMetadata("thisInExtension.kt")
public void testThisInExtension() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineStdlib/cases/thisInExtension.kt");
doTest(fileName);
}
}