From f30449ebbe4114a9910b9fa84291986bfc6fe897 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Sat, 14 Dec 2019 09:57:14 -0800 Subject: [PATCH] code improvements to BinaryCompaTest --- binary-compat/test/src/test/scala/BinaryCompaTest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binary-compat/test/src/test/scala/BinaryCompaTest.scala b/binary-compat/test/src/test/scala/BinaryCompaTest.scala index 27ca81bb..d8dcdd85 100644 --- a/binary-compat/test/src/test/scala/BinaryCompaTest.scala +++ b/binary-compat/test/src/test/scala/BinaryCompaTest.scala @@ -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 ;>(TC;Lscala/collection/generic/CanBuildFrom;)TC; rather than ;>(TC;Lscala/collection/generic/CanBuildFrom;)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 ;>(TC;Lscala/collection/generic/CanBuildFrom;)TC; rather than ;>(TC;Lscala/collection/generic/CanBuildFrom;)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) } }