Skip to content

Commit ca881f1

Browse files
committed
Prepare class path so that #462 will fail.
1 parent f5a91bd commit ca881f1

File tree

1 file changed

+110
-107
lines changed

1 file changed

+110
-107
lines changed

test/dotc/tests.scala

Lines changed: 110 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class tests extends CompilerTest {
3737
val dotcDir = "./src/dotty/"
3838
val picklingDir = "./tests/pickling"
3939

40+
/*
4041
@Test def pickle_pickleOK = compileDir(picklingDir, testPickling)
4142
@Test def pickle_pickling = compileDir(dotcDir + "tools/dotc/core/pickling/", testPickling)
4243
@@ -76,112 +77,114 @@ class tests extends CompilerTest {
7677
@Test def pos_packageObj = compileFile(posDir, "i0239")
7778
@Test def pos_anonClassSubtyping = compileFile(posDir, "anonClassSubtyping")
7879
@Test def pos_extmethods = compileFile(posDir, "extmethods")
79-
80-
@Test def pos_all = compileFiles(posDir)
81-
82-
83-
84-
@Test def new_all = compileFiles(newDir, twice)
85-
86-
@Test def neg_blockescapes() = compileFile(negDir, "blockescapesNeg", xerrors = 1)
87-
@Test def neg_typedapply() = compileFile(negDir, "typedapply", xerrors = 4)
88-
@Test def neg_typedidents() = compileFile(negDir, "typedIdents", xerrors = 2)
89-
@Test def neg_assignments() = compileFile(negDir, "assignments", xerrors = 3)
90-
@Test def neg_typers() = compileFile(negDir, "typers", xerrors = 12)
91-
@Test def neg_privates() = compileFile(negDir, "privates", xerrors = 2)
92-
@Test def neg_rootImports = compileFile(negDir, "rootImplicits", xerrors = 2)
93-
@Test def neg_templateParents() = compileFile(negDir, "templateParents", xerrors = 3)
94-
@Test def neg_autoTupling = compileFile(posDir, "autoTuplingTest", "-language:noAutoTupling" :: Nil, xerrors = 4)
95-
@Test def neg_autoTupling2 = compileFile(negDir, "autoTuplingTest", xerrors = 4)
96-
@Test def neg_companions = compileFile(negDir, "companions", xerrors = 1)
97-
@Test def neg_over = compileFile(negDir, "over", xerrors = 3)
98-
@Test def neg_overrides = compileFile(negDir, "overrides", xerrors = 11)
99-
@Test def neg_projections = compileFile(negDir, "projections", xerrors = 1)
100-
@Test def neg_i39 = compileFile(negDir, "i39", xerrors = 2)
101-
@Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 6)
102-
@Test def neg_t0273_doubledefs = compileFile(negDir, "t0273", xerrors = 1)
103-
@Test def neg_zoo = compileFile(negDir, "zoo", xerrors = 12)
104-
@Test def neg_t1192_legalPrefix = compileFile(negDir, "t1192", xerrors = 1)
105-
@Test def neg_tailcall_t1672b = compileFile(negDir, "tailcall/t1672b", xerrors = 6)
106-
@Test def neg_tailcall_t3275 = compileFile(negDir, "tailcall/t3275", xerrors = 1)
107-
@Test def neg_tailcall_t6574 = compileFile(negDir, "tailcall/t6574", xerrors = 2)
108-
@Test def neg_tailcall = compileFile(negDir, "tailcall/tailrec", xerrors = 7)
109-
@Test def neg_tailcall2 = compileFile(negDir, "tailcall/tailrec-2", xerrors = 2)
110-
@Test def neg_tailcall3 = compileFile(negDir, "tailcall/tailrec-3", xerrors = 2)
111-
@Test def nef_t1279a = compileFile(negDir, "t1279a", xerrors = 1)
112-
@Test def neg_t1843_variances = compileFile(negDir, "t1843-variances", xerrors = 1)
113-
@Test def neg_t2660_ambi = compileFile(negDir, "t2660", xerrors = 2)
114-
@Test def neg_t2994 = compileFile(negDir, "t2994", xerrors = 2)
115-
@Test def neg_subtyping = compileFile(negDir, "subtyping", xerrors = 4)
116-
@Test def neg_variances = compileFile(negDir, "variances", xerrors = 2)
117-
@Test def neg_badAuxConstr = compileFile(negDir, "badAuxConstr", xerrors = 2)
118-
@Test def neg_typetest = compileFile(negDir, "typetest", xerrors = 1)
119-
@Test def neg_t1569_failedAvoid = compileFile(negDir, "t1569-failedAvoid", xerrors = 1)
120-
@Test def neg_cycles = compileFile(negDir, "cycles", xerrors = 8)
121-
@Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 5)
122-
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
123-
@Test def neg_i0091_infpaths = compileFile(negDir, "i0091-infpaths", xerrors = 3)
124-
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
125-
@Test def neg_i0281 = compileFile(negDir, "i0281-null-primitive-conforms", xerrors = 3)
126-
@Test def neg_moduleSubtyping = compileFile(negDir, "moduleSubtyping", xerrors = 4)
127-
@Test def neg_escapingRefs = compileFile(negDir, "escapingRefs", xerrors = 2)
128-
129-
@Test def dotc = compileDir(dotcDir + "tools/dotc", failedOther)(allowDeepSubtypes) // see dotc_core
130-
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", failedOther)
131-
//similar to dotc_core_pickling but for another anon class. Still during firstTransform
132-
@Test def dotc_config = compileDir(dotcDir + "tools/dotc/config")
133-
@Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", failedOther)(allowDeepSubtypes)
134-
// error: error while loading ConstraintHandling$$anon$1$,
135-
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/core/ConstraintHandling$$anon$1.class)'
136-
// has location not matching its contents: contains class $anon
137-
138-
@Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling")(allowDeepSubtypes)
139-
// exception caught when loading class ClassfileParser$$anon$1: dotty.tools.dotc.core.Denotations$NotDefinedHere:
140-
// demanding denotation of module class ClassfileParser$$anon$1$ at phase frontend(1) outside defined interval:
141-
// defined periods are Period(31..36, run = 2) Period(3..24, run = 2) Period(25..26, run = 2)
142-
// Period(27..28, run = 2) Period(29..29, run = 2) Period(30..30, run = 2)
143-
// inside FirstTransform at dotty.tools.dotc.transform.FirstTransform.transform(FirstTransform.scala:33)
144-
// weird.
145-
146-
@Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform")
147-
148-
@Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/parsing")
149-
150-
@Test def dotc_printing = compileDir(dotcDir + "tools/dotc/printing")
151-
152-
@Test def dotc_reporting = compileDir(dotcDir + "tools/dotc/reporting")
153-
154-
@Test def dotc_typer = compileDir(dotcDir + "tools/dotc/typer", failedOther)
155-
// error: error while loading Checking$$anon$2$,
156-
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/typer/Checking$$anon$2.class)'
157-
// has location not matching its contents: contains class $anon
158-
159-
@Test def dotc_util = compileDir(dotcDir + "tools/dotc/util", failedOther)
160-
// java.lang.ClassCastException: dotty.tools.dotc.core.Types$NoType$ cannot be cast to dotty.tools.dotc.core.Types$ClassInfo
161-
// at dotty.tools.dotc.core.SymDenotations$ClassDenotation.classInfo(SymDenotations.scala:1026)
162-
// at dotty.tools.dotc.transform.ExtensionMethods.transform(ExtensionMethods.scala:38)
163-
164-
@Test def tools_io = compileDir(dotcDir + "tools/io", failedOther) // inner class has symbol <none>
165-
166-
@Test def helloWorld = compileFile(posDir, "HelloWorld")
167-
@Test def labels = compileFile(posDir, "Labels")
168-
//@Test def tools = compileDir(dotcDir + "tools", "-deep" :: Nil)(allowDeepSubtypes)
169-
170-
@Test def testNonCyclic = compileArgs(Array(
171-
dotcDir + "tools/dotc/CompilationUnit.scala",
172-
dotcDir + "tools/dotc/core/Types.scala",
173-
dotcDir + "tools/dotc/ast/Trees.scala",
174-
"-Xprompt"
175-
) ++ staleSymbolError)
176-
177-
@Test def testIssue_34 = compileArgs(Array(
178-
dotcDir + "tools/dotc/config/Properties.scala",
179-
dotcDir + "tools/dotc/config/PathResolver.scala",
180-
//"-Ylog:frontend",
181-
"-Xprompt") ++ staleSymbolError)
182-
183-
val javaDir = "./tests/pos/java-interop/"
184-
@Test def java_all = compileFiles(javaDir)
185-
80+
*/
81+
@Test def pos_classpath = compileFile(posDir, "empty-foo", List("-d" , "./", "#runs", "30"))
82+
/*
83+
@Test def pos_all = compileFiles(posDir)
84+
85+
86+
87+
@Test def new_all = compileFiles(newDir, twice)
88+
89+
@Test def neg_blockescapes() = compileFile(negDir, "blockescapesNeg", xerrors = 1)
90+
@Test def neg_typedapply() = compileFile(negDir, "typedapply", xerrors = 4)
91+
@Test def neg_typedidents() = compileFile(negDir, "typedIdents", xerrors = 2)
92+
@Test def neg_assignments() = compileFile(negDir, "assignments", xerrors = 3)
93+
@Test def neg_typers() = compileFile(negDir, "typers", xerrors = 12)
94+
@Test def neg_privates() = compileFile(negDir, "privates", xerrors = 2)
95+
@Test def neg_rootImports = compileFile(negDir, "rootImplicits", xerrors = 2)
96+
@Test def neg_templateParents() = compileFile(negDir, "templateParents", xerrors = 3)
97+
@Test def neg_autoTupling = compileFile(posDir, "autoTuplingTest", "-language:noAutoTupling" :: Nil, xerrors = 4)
98+
@Test def neg_autoTupling2 = compileFile(negDir, "autoTuplingTest", xerrors = 4)
99+
@Test def neg_companions = compileFile(negDir, "companions", xerrors = 1)
100+
@Test def neg_over = compileFile(negDir, "over", xerrors = 3)
101+
@Test def neg_overrides = compileFile(negDir, "overrides", xerrors = 11)
102+
@Test def neg_projections = compileFile(negDir, "projections", xerrors = 1)
103+
@Test def neg_i39 = compileFile(negDir, "i39", xerrors = 2)
104+
@Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 6)
105+
@Test def neg_t0273_doubledefs = compileFile(negDir, "t0273", xerrors = 1)
106+
@Test def neg_zoo = compileFile(negDir, "zoo", xerrors = 12)
107+
@Test def neg_t1192_legalPrefix = compileFile(negDir, "t1192", xerrors = 1)
108+
@Test def neg_tailcall_t1672b = compileFile(negDir, "tailcall/t1672b", xerrors = 6)
109+
@Test def neg_tailcall_t3275 = compileFile(negDir, "tailcall/t3275", xerrors = 1)
110+
@Test def neg_tailcall_t6574 = compileFile(negDir, "tailcall/t6574", xerrors = 2)
111+
@Test def neg_tailcall = compileFile(negDir, "tailcall/tailrec", xerrors = 7)
112+
@Test def neg_tailcall2 = compileFile(negDir, "tailcall/tailrec-2", xerrors = 2)
113+
@Test def neg_tailcall3 = compileFile(negDir, "tailcall/tailrec-3", xerrors = 2)
114+
@Test def nef_t1279a = compileFile(negDir, "t1279a", xerrors = 1)
115+
@Test def neg_t1843_variances = compileFile(negDir, "t1843-variances", xerrors = 1)
116+
@Test def neg_t2660_ambi = compileFile(negDir, "t2660", xerrors = 2)
117+
@Test def neg_t2994 = compileFile(negDir, "t2994", xerrors = 2)
118+
@Test def neg_subtyping = compileFile(negDir, "subtyping", xerrors = 4)
119+
@Test def neg_variances = compileFile(negDir, "variances", xerrors = 2)
120+
@Test def neg_badAuxConstr = compileFile(negDir, "badAuxConstr", xerrors = 2)
121+
@Test def neg_typetest = compileFile(negDir, "typetest", xerrors = 1)
122+
@Test def neg_t1569_failedAvoid = compileFile(negDir, "t1569-failedAvoid", xerrors = 1)
123+
@Test def neg_cycles = compileFile(negDir, "cycles", xerrors = 8)
124+
@Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 5)
125+
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
126+
@Test def neg_i0091_infpaths = compileFile(negDir, "i0091-infpaths", xerrors = 3)
127+
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
128+
@Test def neg_i0281 = compileFile(negDir, "i0281-null-primitive-conforms", xerrors = 3)
129+
@Test def neg_moduleSubtyping = compileFile(negDir, "moduleSubtyping", xerrors = 4)
130+
@Test def neg_escapingRefs = compileFile(negDir, "escapingRefs", xerrors = 2)
131+
132+
@Test def dotc = compileDir(dotcDir + "tools/dotc", failedOther)(allowDeepSubtypes) // see dotc_core
133+
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", failedOther)
134+
//similar to dotc_core_pickling but for another anon class. Still during firstTransform
135+
@Test def dotc_config = compileDir(dotcDir + "tools/dotc/config")
136+
@Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", failedOther)(allowDeepSubtypes)
137+
// error: error while loading ConstraintHandling$$anon$1$,
138+
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/core/ConstraintHandling$$anon$1.class)'
139+
// has location not matching its contents: contains class $anon
140+
141+
@Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling")(allowDeepSubtypes)
142+
// exception caught when loading class ClassfileParser$$anon$1: dotty.tools.dotc.core.Denotations$NotDefinedHere:
143+
// demanding denotation of module class ClassfileParser$$anon$1$ at phase frontend(1) outside defined interval:
144+
// defined periods are Period(31..36, run = 2) Period(3..24, run = 2) Period(25..26, run = 2)
145+
// Period(27..28, run = 2) Period(29..29, run = 2) Period(30..30, run = 2)
146+
// inside FirstTransform at dotty.tools.dotc.transform.FirstTransform.transform(FirstTransform.scala:33)
147+
// weird.
148+
149+
@Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform")
150+
151+
@Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/parsing")
152+
153+
@Test def dotc_printing = compileDir(dotcDir + "tools/dotc/printing")
154+
155+
@Test def dotc_reporting = compileDir(dotcDir + "tools/dotc/reporting")
156+
157+
@Test def dotc_typer = compileDir(dotcDir + "tools/dotc/typer", failedOther)
158+
// error: error while loading Checking$$anon$2$,
159+
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/typer/Checking$$anon$2.class)'
160+
// has location not matching its contents: contains class $anon
161+
162+
@Test def dotc_util = compileDir(dotcDir + "tools/dotc/util", failedOther)
163+
// java.lang.ClassCastException: dotty.tools.dotc.core.Types$NoType$ cannot be cast to dotty.tools.dotc.core.Types$ClassInfo
164+
// at dotty.tools.dotc.core.SymDenotations$ClassDenotation.classInfo(SymDenotations.scala:1026)
165+
// at dotty.tools.dotc.transform.ExtensionMethods.transform(ExtensionMethods.scala:38)
166+
167+
@Test def tools_io = compileDir(dotcDir + "tools/io", failedOther) // inner class has symbol <none>
168+
169+
@Test def helloWorld = compileFile(posDir, "HelloWorld")
170+
@Test def labels = compileFile(posDir, "Labels")
171+
//@Test def tools = compileDir(dotcDir + "tools", "-deep" :: Nil)(allowDeepSubtypes)
172+
173+
@Test def testNonCyclic = compileArgs(Array(
174+
dotcDir + "tools/dotc/CompilationUnit.scala",
175+
dotcDir + "tools/dotc/core/Types.scala",
176+
dotcDir + "tools/dotc/ast/Trees.scala",
177+
"-Xprompt"
178+
) ++ staleSymbolError)
179+
180+
@Test def testIssue_34 = compileArgs(Array(
181+
dotcDir + "tools/dotc/config/Properties.scala",
182+
dotcDir + "tools/dotc/config/PathResolver.scala",
183+
//"-Ylog:frontend",
184+
"-Xprompt") ++ staleSymbolError)
185+
186+
val javaDir = "./tests/pos/java-interop/"
187+
@Test def java_all = compileFiles(javaDir)
188+
*/
186189
//@Test def dotc_compilercommand = compileFile(dotcDir + "tools/dotc/config/", "CompilerCommand")
187190
}

0 commit comments

Comments
 (0)