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

Introduce SAPI_ASSERT_OK #147

Merged
merged 1 commit into from
Mar 17, 2022
Merged

Introduce SAPI_ASSERT_OK #147

merged 1 commit into from
Mar 17, 2022

Conversation

oshogbo
Copy link
Contributor

@oshogbo oshogbo commented Mar 16, 2022

We have a SAPI_ASSERT_OK_AND_ASSIGN which corespondents to
SAPI_ASSIGN_OR_RETURN.

We also have SAPI_RETURN_IF_ERROR but we don't have a coresponding
macro for ASSERT.

I think that this completes the API and makes writting tests a little
bit simpler.

We have a SAPI_ASSERT_OK_AND_ASSIGN which corespondents to
SAPI_ASSIGN_OR_RETURN.

We also have SAPI_RETURN_IF_ERROR but we don't have a coresponding
macro for ASSERT.

I think that this completes the API and makes writting tests a little
bit simpler.
@cblichmann
Copy link
Member

LGTM, pending internal review.

GoogleTest will eventually ship matchers as well (with the ASSERT_OK spelling).

@copybara-service copybara-service bot merged commit 97b3a9e into google:main Mar 17, 2022
happyCoder92 pushed a commit that referenced this pull request May 4, 2022
PiperOrigin-RevId: 435267982
Change-Id: I8f877da70282df9192be4cfe43d74d1539b9824f
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.

2 participants