google / sandboxed-api

Generate sandboxes for C/C++ libraries automatically
https://developers.google.com/sandboxed-api/
Apache License 2.0
1.65k stars 189 forks source link

Introduce SAPI_ASSERT_OK #147

Closed oshogbo closed 2 years ago

oshogbo commented 2 years ago

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 commented 2 years ago

LGTM, pending internal review.

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