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
Port to JUnit java.lang #1955
Port to JUnit java.lang #1955
Conversation
@sjrd Sorry about that, I needed to format a couple of files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eric, thank you for this huge body of work. LGTM.
I studied the ProcessTest changes in detail, because of some work to be done after the JUnit changes settle. The intention, as I understand it, was to do a one-for-one transform. I think you
were successful at that. The bugs I was chasing, and you had no intent of fixing,
still exist for me to fix and I discovered a new set whilst reviewing.
I did a spot check of other files, and as expected, all was well. I did notice what I think will
be a major improvement. Across the board, the Suites used assert(), often times quite a few in one test, with no way to tell which one failed. I believe that JUnit assertEquals will at least print out the expected and the unexpected values, making it easier to figure out which assertion might be failing. I believe that asserTrue() does not give us this information for free.
Someday, every assertion will be uniquely identifiable; either by being the only one of its kind in a test, or by having an explicit message argument (even if only "a1", "a2", etc.)
Yes, @sjrd also mentioned about the As we normalize the shared code between Scala Native and Scala.js we can keep the common code at the top and the Scala Native specific/issue tests at the bottom and Scala.js could do the same. I plan to go and work on toggle case test names in Scala.js after this so if we copy tests the names will be more standard. Anyway, it greatly increases the likelihood of sharing. |
What I was trying to express is that the necessary one-to-one from assert(e == g) to AssertEquals(e, g) you already did for this PR |
* Port ThrowablesTest * Update some names to togglecase in ThreadTest * Port SystemTest * Port StringTest * Port StringBuilderTest * Port StringBufferTest * Port StackTraceElementTest * Port ScalaNumberTest * Port RuntimeTest * Change asserts * Remove unused import * Add ProcessUtils for Runtime and Process tests * Use ProcessUtils for RuntimeTest * Port ProcessTest * Port MathTest * Port LongTest * Port IntegerTest * Port ExceptionTest * Port ClassTest * Port FloatTest * Port DoubleTest * Port CharacterTest * Run scalafmt
This reverts commit 5115112.
This reverts commit 5115112.
* Port ThrowablesTest * Update some names to togglecase in ThreadTest * Port SystemTest * Port StringTest * Port StringBuilderTest * Port StringBufferTest * Port StackTraceElementTest * Port ScalaNumberTest * Port RuntimeTest * Change asserts * Remove unused import * Add ProcessUtils for Runtime and Process tests * Use ProcessUtils for RuntimeTest * Port ProcessTest * Port MathTest * Port LongTest * Port IntegerTest * Port ExceptionTest * Port ClassTest * Port FloatTest * Port DoubleTest * Port CharacterTest * Run scalafmt
* Port ThrowablesTest * Update some names to togglecase in ThreadTest * Port SystemTest * Port StringTest * Port StringBuilderTest * Port StringBufferTest * Port StackTraceElementTest * Port ScalaNumberTest * Port RuntimeTest * Change asserts * Remove unused import * Add ProcessUtils for Runtime and Process tests * Use ProcessUtils for RuntimeTest * Port ProcessTest * Port MathTest * Port LongTest * Port IntegerTest * Port ExceptionTest * Port ClassTest * Port FloatTest * Port DoubleTest * Port CharacterTest * Run scalafmt
There are some small naming updates to
ThreadTest
which was already ported.Here is a unified diff of the rest. https://gist.github.com/ekrich/bcde340a67bca52d4da90f64d296579a