Skip to content

Revert derivedNames test to previous form #12933

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
Jun 25, 2021
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
6 changes: 2 additions & 4 deletions tests/generic-java-signatures/derivedNames.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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<Test.Test$Foo<T1>.B$>" // Windows and OSX
val out2 = "Test$Foo$A<Test$Foo<T1>$B$>" // Linux and sometimes Windows
val out1 = "Test$Foo.Test$Foo$A<Test.Test$Foo<T1>.B$>" // Windows
val out2 = "Test$Foo$A<Test$Foo<T1>$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)
}
Expand Down