Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make it possible to write expect.that(optional).isPresent(), assertWithMessage(...).that(optional).isPresent(), etc., including for Stream as well as Optional. #1221

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link
Contributor

Make it possible to write expect.that(optional).isPresent(), assertWithMessage(...).that(optional).isPresent(), etc., including for Stream as well as Optional.

That is, you no longer need to use about(optionals()) (or about(streams())). (Later, we'll do the same thing for lesser-used APIs like `optionalInts().)

This CL does not make it possible to write Truth.assertThat(optional).isPresent(): For that, you still need to use Truth8. A future CL will eliminate the need to use Truth8.

This continues our work on #746.

RELNOTES=Added that overloads to make it possible to write type-specific assertions when using expect.that(optional) and expect.that(stream).

@copybara-service copybara-service bot closed this Jan 15, 2024
@copybara-service copybara-service bot deleted the test_597240108 branch January 15, 2024 18:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants