Skip to content
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

Fixes #3463 remove usage of assert and replace with appropriate assertThat's #5574

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

Atheer2104
Copy link

@Atheer2104 Atheer2104 commented Feb 27, 2024

Description (required)

Fixes #3463

What changes did you make and why?

The changes that were made was to replace the junit assert in the test suite to use hamcrest assertThat instead. Now Most of the test case were applicable have been changed from assert to use assertThat. Note there are still some test cases left that still rely on assert.

Tests performed (required)

Testing was performed, the entire test suite was run and all the of tests that succeeded before the rewrite succeed now also

Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}.

This was tested on on :app:testBetaDebugUnitTest, the API level was 34

Screenshots (for UI changes only)

Need help? See https://support.google.com/android/answer/9075928


Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

@whym
Copy link
Collaborator

whym commented Mar 4, 2024

If I understand #3463 correctly, the task asks to replace Kotlin's assert, not Junit's assertions like Assert.assertNotNull.

Are there advantages of Hamcrest assertions over Junit assertions? Do they provide better messages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove usages of assert
2 participants