aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-05-10 14:46:43 +0200
committerMartin Odersky <odersky@gmail.com>2016-05-23 16:11:45 +0200
commitcae7b7828934f5b31bfc6b506ca2b5bac8dcde05 (patch)
tree36ab8f12b6bc4211906fb6e1d8a01d18312a3364 /test
parent77498660dbef6cb34e5ebe5bb99647714d9ffeba (diff)
downloaddotty-cae7b7828934f5b31bfc6b506ca2b5bac8dcde05.tar.gz
dotty-cae7b7828934f5b31bfc6b506ca2b5bac8dcde05.tar.bz2
dotty-cae7b7828934f5b31bfc6b506ca2b5bac8dcde05.zip
Add Eq instances of standard types to Predef
To make tests pass, this required a looser specification of `assumedCanEquals`, so that an abstract type T can be compared to arbitrary values, as long as its upper bound can be compared. E.g. T == null T == "abc"
Diffstat (limited to 'test')
-rw-r--r--test/test/CompilerTest.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala
index 1ca836133..995244986 100644
--- a/test/test/CompilerTest.scala
+++ b/test/test/CompilerTest.scala
@@ -238,9 +238,13 @@ abstract class CompilerTest {
val nerrors = reporter.errorCount
val xerrors = (expectedErrorsPerFile map {_.totalErrors}).sum
+ def expectedErrorFiles =
+ expectedErrorsPerFile.collect{
+ case er if er.totalErrors > 0 => er.fileName
+ }
assert(nerrors == xerrors,
s"""Wrong # of errors. Expected: $xerrors, found: $nerrors
- |Files with expected errors: ${expectedErrorsPerFile.collect{ case er if er.totalErrors > 0 => er.fileName} }
+ |Files with expected errors: $expectedErrorFiles%, %
""".stripMargin)
// NEG TEST
if (xerrors > 0) {