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

Change generic assertFails to assertFailure with specific exception #614

Merged

Conversation

EpicDima
Copy link
Contributor

@EpicDima EpicDima commented Jan 3, 2025

Fixes #611


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

@@ -41,7 +41,8 @@ class OffsetTest {
TestFiller(modifier = Modifier.size(1))
}
}
assertFails {
// check when going beyond the border of the TextSurface#get
Copy link
Contributor Author

@EpicDima EpicDima Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably change the logic inside TextSurface#get, because otherwise using Modifier.offset is dangerous due to crashes, which is not present in the same cases in the Compose UI, for example.
We can do as in #255 or in another way.

@JakeWharton
Copy link
Owner

I will rebase this after my next PR which is a big test migration.

@JakeWharton JakeWharton force-pushed the epicdima/remove_assert_fails branch from 1b4c327 to b0b0218 Compare January 3, 2025 18:42
@JakeWharton JakeWharton force-pushed the epicdima/remove_assert_fails branch from b0b0218 to bae8753 Compare January 3, 2025 18:42
@JakeWharton JakeWharton changed the title Change generic assertFails to assertFailsWith with specific exception Change generic assertFails to assertFailure with specific exception Jan 3, 2025
@JakeWharton JakeWharton enabled auto-merge (squash) January 3, 2025 18:43
@JakeWharton
Copy link
Owner

I switched to a custom assertFailure rather than use kotlin.test. Still pushing for willowtreeapps/assertk#511.

@JakeWharton JakeWharton merged commit 6da5f63 into JakeWharton:trunk Jan 3, 2025
12 checks passed
@EpicDima EpicDima deleted the epicdima/remove_assert_fails branch January 3, 2025 23:05
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 bare assertFails in OffsetTest
2 participants