Skip to content

code improvements to BinaryCompaTest #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions binary-compat/test/src/test/scala/BinaryCompaTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class BinaryCompaTest {
val unexpectedDescriptions =
allProblems.iterator
.map(_.description("new"))
.map{x => println(x); x}
// code improvement: it would be more standard to use a ProblemFilter here
.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;")
.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;")
.toList
val msg =
unexpectedDescriptions.mkString(
s"The following ${allProblems.size} problems were reported but not expected:\n - ", "\n - ", "\n")
s"The following ${unexpectedDescriptions.size} problems were reported but not expected:\n - ", "\n - ", "\n")
Assert.assertEquals(msg, Nil, unexpectedDescriptions)
}
}