Skip to content

Commit 8cafcb9

Browse files
committed
Merge pull request #1189 from dotty-staging/tasty-dotty-tests
TASTY tests for src/dotty
2 parents e4196bb + 709ab9d commit 8cafcb9

File tree

1 file changed

+78
-10
lines changed

1 file changed

+78
-10
lines changed

test/dotc/tests.scala

Lines changed: 78 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ class tests extends CompilerTest {
5050
val sourceDir = "./src/"
5151
val dottyDir = sourceDir + "dotty/"
5252
val toolsDir = dottyDir + "tools/"
53+
val backendDir = toolsDir + "backend/"
5354
val dotcDir = toolsDir + "dotc/"
5455
val coreDir = dotcDir + "core/"
56+
val parsingDir = dotcDir + "parsing/"
57+
val replDir = dotcDir + "repl/"
5558
val typerDir = dotcDir + "typer/"
5659

5760
@Test def pickle_pickleOK = compileDir(testsDir, "pickling", testPickling)
@@ -191,11 +194,35 @@ class tests extends CompilerTest {
191194
@Test def java_all = compileFiles(javaDir, twice)
192195
//@Test def dotc_compilercommand = compileFile(dotcDir + "config/", "CompilerCommand")
193196

197+
//TASTY tests
194198
@Test def tasty_new_all = compileFiles(newDir, testPickling)
199+
200+
@Test def tasty_dotty = compileDir(sourceDir, "dotty", testPickling)
201+
@Test def tasty_annotation_internal = compileDir(s"${dottyDir}annotation/", "internal", testPickling)
202+
@Test def tasty_runtime = compileDir(s"$dottyDir", "runtime", testPickling)
203+
204+
//TODO: issues with ./src/dotty/runtime/vc/VCPrototype.scala
205+
//@Test def tasty_runtime_vc = compileDir(s"${dottyDir}runtime/", "vc", testPickling)
206+
207+
@Test def tasty_tools = compileDir(dottyDir, "tools", testPickling)
208+
209+
//TODO: issue with ./src/dotty/tools/backend/jvm/DottyBackendInterface.scala
210+
@Test def tasty_backend_jvm = compileList("tasty_backend_jvm", List(
211+
"CollectEntryPoints.scala", "GenBCode.scala", "LabelDefs.scala",
212+
"scalaPrimitives.scala"
213+
) map (s"${backendDir}jvm/" + _), testPickling)
214+
215+
//TODO: issue with ./src/dotty/tools/backend/sjs/JSCodeGen.scala
216+
@Test def tasty_backend_sjs = compileList("tasty_backend_sjs", List(
217+
"GenSJSIR.scala", "JSDefinitions.scala", "JSEncoding.scala", "JSInterop.scala",
218+
"JSPositions.scala", "JSPrimitives.scala", "ScopedVar.scala"
219+
) map (s"${backendDir}sjs/" + _), testPickling)
220+
221+
@Test def tasty_dotc = compileDir(toolsDir, "dotc", testPickling)
222+
@Test def tasty_dotc_ast = compileDir(dotcDir, "ast", testPickling)
195223
@Test def tasty_dotc_config = compileDir(dotcDir, "config", testPickling)
196-
@Test def tasty_dotc_printing = compileDir(dotcDir, "printing", testPickling)
197-
//@Test def tasty_dotc_reporting = compileDir(dotcDir, "reporting", testPickling)
198-
@Test def tasty_dotc_util = compileDir(dotcDir, "util", testPickling)
224+
225+
//TODO: issue with ./src/dotty/tools/dotc/core/Types.scala
199226
@Test def tasty_core = compileList("tasty_core", List(
200227
"Annotations.scala", "Constants.scala", "Constraint.scala", "ConstraintHandling.scala",
201228
"ConstraintRunInfo.scala", "Contexts.scala", "Decorators.scala", "Definitions.scala",
@@ -206,15 +233,56 @@ class tests extends CompilerTest {
206233
"TypeApplications.scala", "TypeComparer.scala", "TypeErasure.scala", "TypeOps.scala",
207234
"TyperState.scala", "Uniques.scala"
208235
) map (coreDir + _), testPickling)
209-
@Test def tasty_typer = compileList("tasty_typer", List(
210-
"Applications.scala", "Checking.scala", "ConstFold.scala", "ErrorReporting.scala",
211-
"EtaExpansion.scala", "FrontEnd.scala", "Implicits.scala", "ImportInfo.scala",
212-
"Inferencing.scala", "Mode.scala", "ProtoTypes.scala", "ReTyper.scala", "RefChecks.scala",
213-
"TypeAssigner.scala", "Typer.scala", "VarianceChecker.scala", "Variances.scala"
214-
) map (typerDir + _), testPickling)
215-
@Test def tasty_tasty = compileDir(coreDir, "tasty", testPickling)
236+
216237
@Test def tasty_classfile = compileDir(coreDir, "classfile", testPickling)
238+
@Test def tasty_tasty = compileDir(coreDir, "tasty", testPickling)
217239
@Test def tasty_unpickleScala2 = compileDir(coreDir, "unpickleScala2", testPickling)
240+
241+
//TODO: issue with ./src/dotty/tools/dotc/parsing/Parsers.scala
242+
@Test def tasty_dotc_parsing = compileList("tasty_dotc_parsing", List(
243+
"CharArrayReader.scala", "JavaParsers.scala", "JavaScanners.scala", "JavaTokens.scala",
244+
"MarkupParserCommon.scala", "MarkupParsers.scala", "package.scala" ,"Scanners.scala",
245+
"ScriptParsers.scala", "SymbolicXMLBuilder.scala", "Tokens.scala", "Utility.scala"
246+
) map (parsingDir + _), testPickling)
247+
248+
@Test def tasty_dotc_printing = compileDir(dotcDir, "printing", testPickling)
249+
250+
//TODO: issues with ./src/dotty/tools/dotc/repl/CompilingInterpreter.scala,
251+
//./src/dotty/tools/dotc/repl/InterpreterLoop.scala
252+
@Test def tasty_dotc_repl = compileList("tasty_dotc_repl", List(
253+
"AbstractFileClassLoader.scala", "ConsoleWriter.scala", "InteractiveReader.scala",
254+
"Interpreter.scala", "Main.scala", "NewLinePrintWriter.scala", "REPL.scala", "SimpleReader.scala"
255+
) map (replDir + _), testPickling)
256+
257+
//@Test def tasty_dotc_reporting = compileDir(dotcDir, "reporting", testPickling)
258+
@Test def tasty_dotc_rewrite = compileDir(dotcDir, "rewrite", testPickling)
259+
260+
//TODO: issues with LazyVals.scala, PatternMatcher.scala
261+
@Test def tasty_dotc_transform = compileList("tasty_dotc_transform", List(
262+
"AugmentScala2Traits.scala", "CapturedVars.scala", "CheckReentrant.scala", "CheckStatic.scala",
263+
"ClassOf.scala", "CollectEntryPoints.scala", "Constructors.scala", "CrossCastAnd.scala",
264+
"CtxLazy.scala", "ElimByName.scala", "ElimErasedValueType.scala", "ElimRepeated.scala",
265+
"ElimStaticThis.scala", "Erasure.scala", "ExpandPrivate.scala", "ExpandSAMs.scala",
266+
"ExplicitOuter.scala", "ExplicitSelf.scala", "ExtensionMethods.scala", "FirstTransform.scala",
267+
"Flatten.scala", "FullParameterization.scala", "FunctionalInterfaces.scala", "GetClass.scala",
268+
"Getters.scala", "InterceptedMethods.scala", "LambdaLift.scala", "LiftTry.scala", "LinkScala2ImplClasses.scala",
269+
"MacroTransform.scala", "Memoize.scala", "Mixin.scala", "MixinOps.scala", "NonLocalReturns.scala",
270+
"NormalizeFlags.scala", "OverridingPairs.scala", "ParamForwarding.scala", "Pickler.scala", "PostTyper.scala",
271+
"ResolveSuper.scala", "RestoreScopes.scala", "SeqLiterals.scala", "Splitter.scala", "SuperAccessors.scala",
272+
"SymUtils.scala", "SyntheticMethods.scala", "TailRec.scala", "TreeChecker.scala", "TreeExtractors.scala",
273+
"TreeGen.scala", "TreeTransform.scala", "TypeTestsCasts.scala", "TypeUtils.scala", "ValueClasses.scala",
274+
"VCElideAllocations.scala", "VCInlineMethods.scala"
275+
) map (s"${dotcDir}transform/" + _), testPickling)
276+
277+
//TODO: issue with ./src/dotty/tools/dotc/typer/Namer.scala
278+
@Test def tasty_typer = compileList("tasty_typer", List(
279+
"Applications.scala", "Checking.scala", "ConstFold.scala", "ErrorReporting.scala",
280+
"EtaExpansion.scala", "FrontEnd.scala", "Implicits.scala", "ImportInfo.scala",
281+
"Inferencing.scala", "Mode.scala", "ProtoTypes.scala", "ReTyper.scala", "RefChecks.scala",
282+
"TypeAssigner.scala", "Typer.scala", "VarianceChecker.scala", "Variances.scala"
283+
) map (typerDir + _), testPickling)
284+
285+
@Test def tasty_dotc_util = compileDir(dotcDir, "util", testPickling)
218286
@Test def tasty_tools_io = compileDir(toolsDir, "io", testPickling)
219287
@Test def tasty_tests = compileDir(testsDir, "tasty", testPickling)
220288
}

0 commit comments

Comments
 (0)