Minor in JS: moved test for additional vars during inline to separate directory

This commit is contained in:
Alexey Tsvetkov
2015-04-21 18:25:53 +03:00
parent 7a0787bc25
commit fd09d4d837
5 changed files with 73 additions and 7 deletions
@@ -834,6 +834,10 @@ fun main(args: Array<String>) {
testClass(javaClass<AbstractJsCodeTest>()) {
model("jsCode/cases")
}
testClass(javaClass<AbstractInlineSizeReductionTest>()) {
model("inlineSizeReduction/cases")
}
}
testGroup("js/js.tests/test", "compiler/testData") {
@@ -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 AbstractInlineSizeReductionTest extends AbstractSingleFileTranslationWithDirectivesTest {
public AbstractInlineSizeReductionTest() {
super("inlineSizeReduction/");
}
}
@@ -281,12 +281,6 @@ public class InlineJsTestGenerated extends AbstractInlineJsTest {
doTest(fileName);
}
@TestMetadata("noAdditionalVarsCreated.kt")
public void testNoAdditionalVarsCreated() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/noAdditionalVarsCreated.kt");
doTest(fileName);
}
@TestMetadata("noInlineLambda.kt")
public void testNoInlineLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/noInlineLambda.kt");
@@ -0,0 +1,43 @@
/*
* 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.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/inlineNoAdditionalVarsCreated/cases")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class InlineNoAdditionalVarsCreatedTestGenerated extends AbstractInlineNoAdditionalVarsCreatedTest {
public void testAllFilesPresentInCases() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/inlineNoAdditionalVarsCreated/cases"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("simpleReturnFunction.kt")
public void testSimpleReturnFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("js/js.translator/testData/inlineNoAdditionalVarsCreated/cases/simpleReturnFunction.kt");
doTest(fileName);
}
}
@@ -1,7 +1,7 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test
// COUNT_VARS: function=test count=0
// CHECK_VARS_COUNT: function=test count=0
// A copy of stdlib run function.
// Copied to not to depend on run implementation.