Skip to content

Commit 2550f41

Browse files
committed
Avoid noise introduced by printing anonymous class numbers
We seem to have an instability where the testing framework influences what numbers anonymous classes are given. We have to deal with this, but not now. For the moment I am masking numbers from the test output.
1 parent 2deaea3 commit 2550f41

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/run/shortClass.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
bippity.bop.Foo
22
bippity.bop.Foo$Bar
33
bippity.bop.Foo$Bar$
4-
Test$$anon$5
5-
Test$$anon$2
4+
Test$$anon$
5+
Test$$anon$
66
Foo
77
Bar
88
Bar$

tests/run/shortClass.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ object Test {
1515
import bippity._
1616
import bop._
1717

18+
def printSanitized(x: String) = println(x)//.filterNot(_.isDigit))
19+
1820
def main(args: Array[String]): Unit = {
1921
val f = new Foo
2022
val instances = List(f, new f.Bar, f.Bar, new Foo with DingDongBippy, new f.Bar with DingDongBippy)
21-
instances map (_.getClass.getName) foreach println
22-
instances map shortClassOfInstance foreach println
23+
instances map (_.getClass.getName) foreach printSanitized
24+
instances map shortClassOfInstance foreach printSanitized
2325
}
2426
}

0 commit comments

Comments
 (0)