Skip to content

Commit 74cd2db

Browse files
committed
Move to comment-based command line arg tests
1 parent f52385a commit 74cd2db

11 files changed

+12
-17
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ class CompilationTests {
6565
compileFile("tests/pos-custom-args/i10383.scala", defaultOptions.and("-source", "future", "-deprecation", "-Xfatal-warnings")),
6666
compileFile("tests/pos-custom-args/i13044.scala", defaultOptions.and("-Xmax-inlines:33")),
6767
compileFile("tests/pos-custom-args/jdk-8-app.scala", defaultOptions.and("-release:8")),
68-
compileFile("tests/pos-custom-args/single-additional-import.scala", defaultOptions.and("-Yimports:scala,java.lang,scala.annotation")),
69-
compileFile("tests/pos-custom-args/multiple-additional-imports.scala", defaultOptions.and("-Yimports:scala,java.lang,scala.Predef,scala.annotation,scala.util.matching")),
7068
).checkCompile()
7169
}
7270

@@ -153,11 +151,6 @@ class CompilationTests {
153151
compileFile("tests/neg-custom-args/ovlazy.scala", scala2CompatMode.and("-Xfatal-warnings")),
154152
compileFile("tests/neg-custom-args/newline-braces.scala", scala2CompatMode.and("-Xfatal-warnings")),
155153
compileFile("tests/neg-custom-args/autoTuplingTest.scala", defaultOptions.andLanguageFeature("noAutoTupling")),
156-
compileFile("tests/neg-custom-args/nopredef.scala", defaultOptions.and("-Yno-predef")),
157-
compileFile("tests/neg-custom-args/noimports.scala", defaultOptions.and("-Yno-imports")),
158-
compileFile("tests/neg-custom-args/noimports2.scala", defaultOptions.and("-Yno-imports")),
159-
compileFile("tests/neg-custom-args/noimports-additional.scala", defaultOptions.and("-Yimports:scala.annotation,scala.util.matching")),
160-
compileFile("tests/neg-custom-args/nopredef-additional.scala", defaultOptions.and("-Yimports:java.lang,scala.annotation,scala.util.matching")),
161154
compileFile("tests/neg-custom-args/i1650.scala", allowDeepSubtypes),
162155
compileFile("tests/neg-custom-args/i3882.scala", allowDeepSubtypes),
163156
compileFile("tests/neg-custom-args/i4372.scala", allowDeepSubtypes),

tests/neg-custom-args/nopredef.scala

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
// scalac: -Yno-imports -Yimports:scala.annotation,scala.util.matching
22
class annotation extends Annotation
33
val s: String = "str" // error
44
val regex: Regex = new Regex("str")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// scalac: -Yno-imports
12
object Test {
23
val t: Int = 1 // error: not found Int
34
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// scalac: -Yno-imports
12
object Test {
23
assert("asdf" == "asdf") // error: not found assert
34
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// scalac: -Yno-predef -Yimports:java.lang,scala.annotation,scala.util.matching
12
class annotation extends Annotation
23
val s: String = "str"
34
val regex: Regex = s.r // error

tests/neg/nopredef.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
// scalac: -Yno-predef
12
import Predef.{assert as _}
2-
33
object Test {
44
assert("asdf" == "asdf") // error: not found assert
55
}

tests/pos-custom-args/multiple-additional-imports.scala

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/pos-custom-args/single-additional-import.scala

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// scalac: -Yimports:scala,java.lang,scala.Predef,scala.annotation,scala.util.matching
2+
3+
class annotation extends Annotation
4+
val s: String = "str"
5+
val regex: Regex = s.r
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// scalac: -Yimports:scala.annotation
2+
class annotation extends Annotation

0 commit comments

Comments
 (0)