diff options
| author | 2021-05-07 22:12:23 -0700 | |
|---|---|---|
| committer | 2021-05-11 16:15:10 -0700 | |
| commit | bbd2a0d7ad74bb655f6f846884adadf297955205 (patch) | |
| tree | 1e0b8a10f59dc42103e6119634c541cc2cffd626 /libs/gui/QueueBufferInputOutput.cpp | |
| parent | a416e7b190b0275234221e8074ca30c914ce0533 (diff) | |
binderLibTest: better message for status
Turn code like
ret = ...;
EXPECT_EQ(OK, ret);
into
EXPECT_THAT(..., StatusEq(OK));
This avoids declaring a status_t variable every time.
More importantly, the StatusEq matcher prints statusToString() for both the
expected and actual value, leading to much clearer error messages than
status_t codes. Example:
Value of: server->addRpcClient(android::base::unique_fd())
Expected: BAD_VALUE
Actual: -2147483646, FAILED_TRANSACTION
Also fix places where the return value is not checked.
Test: run it
Change-Id: I0c6ee1cedb300b978c6ed7b44fd5da37ba6d7aa7
Diffstat (limited to 'libs/gui/QueueBufferInputOutput.cpp')
0 files changed, 0 insertions, 0 deletions