From f54c8b51d619882395d83cea68b9e9fa06ad19ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Fri, 25 Jun 2021 13:35:47 +0200 Subject: [PATCH] Revert `derivedNames` test to previous form The previous change broke the test on macs with updated jdk --- tests/generic-java-signatures/derivedNames.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/generic-java-signatures/derivedNames.scala b/tests/generic-java-signatures/derivedNames.scala index 23df59ff561d..0cc5bc8a1ab7 100644 --- a/tests/generic-java-signatures/derivedNames.scala +++ b/tests/generic-java-signatures/derivedNames.scala @@ -4,12 +4,10 @@ object Test { def main(args: Array[String]): Unit = { val objectB = classOf[Foo[Any]].getClasses val returnType = objectB(1).getDeclaredMethod("m").getGenericReturnType.asInstanceOf[ParameterizedType] - val out1 = "Test$Foo.Test$Foo$A.B$>" // Windows and OSX - val out2 = "Test$Foo$A$B$>" // Linux and sometimes Windows + val out1 = "Test$Foo.Test$Foo$A.B$>" // Windows + val out2 = "Test$Foo$A$B$>" // Linux, OSX and sometimes Windows if (scala.util.Properties.isWin) assert(returnType.toString == out1 || returnType.toString == out2) - else if (scala.util.Properties.isMac) - assert(returnType.toString == out1, s"$returnType != $out1") else assert(returnType.toString == out2) }