Refactoring in Codegen Tests
This commit is contained in:
@@ -32,7 +32,3 @@ fun box(): String {
|
||||
val s = doTest()
|
||||
return if (s == "1:2;2:3;3:4;") "OK" else "fail: $s"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(box())
|
||||
}
|
||||
-4
@@ -35,7 +35,3 @@ fun box(): String {
|
||||
val s = M().doTest()
|
||||
return if (s == "1:2;2:3;3:4;") "OK" else "fail: $s"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(box())
|
||||
}
|
||||
@@ -32,7 +32,3 @@ fun box(): String {
|
||||
val s = doTest()
|
||||
return if (s == "1:2;2:3;3:4;") "OK" else "fail: $s"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(box())
|
||||
}
|
||||
-4
@@ -35,7 +35,3 @@ fun box(): String {
|
||||
val s = M().doTest()
|
||||
return if (s == "1:2;2:3;3:4;") "OK" else "fail: $s"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(box())
|
||||
}
|
||||
@@ -32,7 +32,3 @@ fun box(): String {
|
||||
val s = doTest()
|
||||
return if (s == "1:2;2:3;3:4;") "OK" else "fail: $s"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(box())
|
||||
}
|
||||
-4
@@ -35,7 +35,3 @@ fun box(): String {
|
||||
val s = M().doTest()
|
||||
return if (s == "1:2;2:3;3:4;") "OK" else "fail: $s"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(box())
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
public abstract class AbstractIntrinsicsTestCase extends CodegenTestCase {
|
||||
@Override
|
||||
protected String getPrefix() {
|
||||
return "intrinsic";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations();
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
public abstract class AbstractMultiDeclTestCase extends CodegenTestCase {
|
||||
@Override
|
||||
protected String getPrefix() {
|
||||
return "multiDecl";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations();
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.jet.codegen;
|
||||
package org.jetbrains.jet.codegen.generated;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.Test;
|
||||
@@ -24,12 +24,12 @@ import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.test.InnerTestClasses;
|
||||
import org.jetbrains.jet.test.TestMetadata;
|
||||
|
||||
import org.jetbrains.jet.codegen.AbstractIntrinsicsTestCase;
|
||||
import org.jetbrains.jet.codegen.generated.AbstractCodegenTest;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/intrinsics")
|
||||
public class IntrinsicsTestGenerated extends AbstractIntrinsicsTestCase {
|
||||
public class IntrinsicsTestGenerated extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInIntrinsics() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/intrinsics"), "kt", true);
|
||||
}
|
||||
+17
-17
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.jet.codegen;
|
||||
package org.jetbrains.jet.codegen.generated;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.Test;
|
||||
@@ -24,13 +24,13 @@ import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.test.InnerTestClasses;
|
||||
import org.jetbrains.jet.test.TestMetadata;
|
||||
|
||||
import org.jetbrains.jet.codegen.AbstractMultiDeclTestCase;
|
||||
import org.jetbrains.jet.codegen.generated.AbstractCodegenTest;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl")
|
||||
@InnerTestClasses({MultiDeclTestGenerated.ForArray.class, MultiDeclTestGenerated.ForIterator.class, MultiDeclTestGenerated.ForRange.class})
|
||||
public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
public class MultiDeclTestGenerated extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInMultiDecl() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl"), "kt", true);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forArray")
|
||||
@InnerTestClasses({ForArray.Int.class, ForArray.Long.class})
|
||||
public static class ForArray extends AbstractMultiDeclTestCase {
|
||||
public static class ForArray extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInForArray() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forArray"), "kt", true);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forArray/int")
|
||||
public static class Int extends AbstractMultiDeclTestCase {
|
||||
public static class Int extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInInt() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forArray/int"), "kt", true);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forArray/long")
|
||||
public static class Long extends AbstractMultiDeclTestCase {
|
||||
public static class Long extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInLong() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forArray/long"), "kt", true);
|
||||
}
|
||||
@@ -189,7 +189,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forIterator")
|
||||
@InnerTestClasses({ForIterator.LongIterator.class})
|
||||
public static class ForIterator extends AbstractMultiDeclTestCase {
|
||||
public static class ForIterator extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInForIterator() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forIterator"), "kt", true);
|
||||
}
|
||||
@@ -220,7 +220,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forIterator/longIterator")
|
||||
public static class LongIterator extends AbstractMultiDeclTestCase {
|
||||
public static class LongIterator extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInLongIterator() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forIterator/longIterator"), "kt", true);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange")
|
||||
@InnerTestClasses({ForRange.ExplicitRangeTo.class, ForRange.ExplicitRangeToWithDot.class, ForRange.Int.class, ForRange.Long.class})
|
||||
public static class ForRange extends AbstractMultiDeclTestCase {
|
||||
public static class ForRange extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInForRange() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange"), "kt", true);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/explicitRangeTo")
|
||||
@InnerTestClasses({ExplicitRangeTo.Int.class, ExplicitRangeTo.Long.class})
|
||||
public static class ExplicitRangeTo extends AbstractMultiDeclTestCase {
|
||||
public static class ExplicitRangeTo extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInExplicitRangeTo() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/explicitRangeTo"), "kt", true);
|
||||
}
|
||||
@@ -320,7 +320,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/explicitRangeTo/int")
|
||||
public static class Int extends AbstractMultiDeclTestCase {
|
||||
public static class Int extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInInt() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/explicitRangeTo/int"), "kt", true);
|
||||
}
|
||||
@@ -348,7 +348,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/explicitRangeTo/long")
|
||||
public static class Long extends AbstractMultiDeclTestCase {
|
||||
public static class Long extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInLong() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/explicitRangeTo/long"), "kt", true);
|
||||
}
|
||||
@@ -386,7 +386,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/explicitRangeToWithDot")
|
||||
@InnerTestClasses({ExplicitRangeToWithDot.Int.class, ExplicitRangeToWithDot.Long.class})
|
||||
public static class ExplicitRangeToWithDot extends AbstractMultiDeclTestCase {
|
||||
public static class ExplicitRangeToWithDot extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/explicitRangeToWithDot"), "kt", true);
|
||||
}
|
||||
@@ -417,7 +417,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/explicitRangeToWithDot/int")
|
||||
public static class Int extends AbstractMultiDeclTestCase {
|
||||
public static class Int extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInInt() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/explicitRangeToWithDot/int"), "kt", true);
|
||||
}
|
||||
@@ -445,7 +445,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/explicitRangeToWithDot/long")
|
||||
public static class Long extends AbstractMultiDeclTestCase {
|
||||
public static class Long extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInLong() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/explicitRangeToWithDot/long"), "kt", true);
|
||||
}
|
||||
@@ -482,7 +482,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/int")
|
||||
public static class Int extends AbstractMultiDeclTestCase {
|
||||
public static class Int extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInInt() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/int"), "kt", true);
|
||||
}
|
||||
@@ -510,7 +510,7 @@ public class MultiDeclTestGenerated extends AbstractMultiDeclTestCase {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/multiDecl/forRange/long")
|
||||
public static class Long extends AbstractMultiDeclTestCase {
|
||||
public static class Long extends AbstractCodegenTest {
|
||||
public void testAllFilesPresentInLong() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/multiDecl/forRange/long"), "kt", true);
|
||||
}
|
||||
@@ -22,8 +22,6 @@ import org.jetbrains.jet.checkers.AbstractDiagnosticsTestWithEagerResolve;
|
||||
import org.jetbrains.jet.checkers.AbstractJetPsiCheckerTest;
|
||||
import org.jetbrains.jet.codegen.AbstractCheckLocalVariablesTableTest;
|
||||
import org.jetbrains.jet.codegen.AbstractDataClassCodegenTest;
|
||||
import org.jetbrains.jet.codegen.AbstractIntrinsicsTestCase;
|
||||
import org.jetbrains.jet.codegen.AbstractMultiDeclTestCase;
|
||||
import org.jetbrains.jet.codegen.defaultConstructor.AbstractDefaultConstructorCodegenTest;
|
||||
import org.jetbrains.jet.codegen.flags.AbstractWriteFlagsTest;
|
||||
import org.jetbrains.jet.codegen.generated.AbstractCodegenTest;
|
||||
@@ -86,14 +84,14 @@ public class GenerateTests {
|
||||
generateTest(
|
||||
"compiler/tests/",
|
||||
"IntrinsicsTestGenerated",
|
||||
AbstractIntrinsicsTestCase.class,
|
||||
AbstractCodegenTest.class,
|
||||
testModel("compiler/testData/codegen/intrinsics", "blackBoxFileByFullPath")
|
||||
);
|
||||
|
||||
generateTest(
|
||||
"compiler/tests/",
|
||||
"MultiDeclTestGenerated",
|
||||
AbstractMultiDeclTestCase.class,
|
||||
AbstractCodegenTest.class,
|
||||
testModel("compiler/testData/codegen/multiDecl", "blackBoxFileByFullPath")
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user