Skip to content

Commit f30449e

Browse files
committed
code improvements to BinaryCompaTest
1 parent fd23576 commit f30449e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

binary-compat/test/src/test/scala/BinaryCompaTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ class BinaryCompaTest {
2626
val unexpectedDescriptions =
2727
allProblems.iterator
2828
.map(_.description("new"))
29-
.map{x => println(x); x}
29+
// code improvement: it would be more standard to use a ProblemFilter here
3030
.filterNot(_ == "static method id(scala.collection.Iterable,scala.collection.generic.CanBuildFrom)scala.collection.Iterable in class org.example.Lib has a different signature in new version, where it is <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<Lscala/runtime/Nothing$;TA;TC;>;)TC; rather than <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<TC;TA;TC;>;)TC;")
3131
.filterNot(_ == "method id(scala.collection.Iterable,scala.collection.generic.CanBuildFrom)scala.collection.Iterable in object org.example.Lib has a different signature in new version, where it is <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<Lscala/runtime/Nothing$;TA;TC;>;)TC; rather than <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<TC;TA;TC;>;)TC;")
3232
.toList
3333
val msg =
3434
unexpectedDescriptions.mkString(
35-
s"The following ${allProblems.size} problems were reported but not expected:\n - ", "\n - ", "\n")
35+
s"The following ${unexpectedDescriptions.size} problems were reported but not expected:\n - ", "\n - ", "\n")
3636
Assert.assertEquals(msg, Nil, unexpectedDescriptions)
3737
}
3838
}

0 commit comments

Comments
 (0)