Initial support for classes in scripts and REPL
This commit is contained in:
@@ -31,6 +31,7 @@ import org.jetbrains.jet.repl.AbstractReplInterpreterTest;
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/repl")
|
||||
@InnerTestClasses({ReplInterpreterTestGenerated.Classes.class, ReplInterpreterTestGenerated.Objects.class})
|
||||
public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
|
||||
public void testAllFilesPresentInRepl() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/repl"), Pattern.compile("^(.+)\\.repl$"), true);
|
||||
@@ -106,4 +107,82 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
|
||||
doTest("compiler/testData/repl/twoClosures.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/repl/classes")
|
||||
public static class Classes extends AbstractReplInterpreterTest {
|
||||
public void testAllFilesPresentInClasses() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/repl/classes"), Pattern.compile("^(.+)\\.repl$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("classInheritance.repl")
|
||||
public void testClassInheritance() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/classInheritance.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("classRedeclaration.repl")
|
||||
public void testClassRedeclaration() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/classRedeclaration.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyClass.repl")
|
||||
public void testEmptyClass() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/emptyClass.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyClassRedeclaration.repl")
|
||||
public void testEmptyClassRedeclaration() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/emptyClassRedeclaration.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntrySubclass.repl")
|
||||
public void testEnumEntrySubclass() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/enumEntrySubclass.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("import.repl")
|
||||
public void testImport() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/import.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClass.repl")
|
||||
public void testSimpleClass() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/simpleClass.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleEnum.repl")
|
||||
public void testSimpleEnum() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/simpleEnum.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleTrait.repl")
|
||||
public void testSimpleTrait() throws Exception {
|
||||
doTest("compiler/testData/repl/classes/simpleTrait.repl");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/repl/objects")
|
||||
public static class Objects extends AbstractReplInterpreterTest {
|
||||
public void testAllFilesPresentInObjects() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/repl/objects"), Pattern.compile("^(.+)\\.repl$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("emptyObject.repl")
|
||||
public void testEmptyObject() throws Exception {
|
||||
doTest("compiler/testData/repl/objects/emptyObject.repl");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleObjectDeclaration.repl")
|
||||
public void testSimpleObjectDeclaration() throws Exception {
|
||||
doTest("compiler/testData/repl/objects/simpleObjectDeclaration.repl");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite("ReplInterpreterTestGenerated");
|
||||
suite.addTestSuite(ReplInterpreterTestGenerated.class);
|
||||
suite.addTestSuite(Classes.class);
|
||||
suite.addTestSuite(Objects.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user