forked from eclipse-platform/eclipse.platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve array length assertions in ant and debug tests
In order to reduce/avoid usage of ambiguous `assertEquals` (hard to distinguish expected/actual) and prepare for a migration to JUnit 5 with swapped expected/actual parameters in the `assertEquals` signature, this change replaces certain `assertEquals` calls: * Replace `assertEquals(MESSAGE, EXPECTED, ACTUAL.length)` with `assertThat(MESSAGE, ACTUAL, arrayWithSize(EXPECTED))` and remove obsolete message where possible * Replace `assertEquals(EXPECTED, ACTUAL.length)` with `assertThat(ACTUAL.length, is(EXPECTED))` if `ACTUAL` is a primitive type array * Replace `arrayWithSize(0)` with `emptyArray()` to improve failure messages * Combine array size comparison with array contents comparison where possible
- Loading branch information
1 parent
5fedd2d
commit 29e3796
Showing
27 changed files
with
262 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.