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
Loading
Please register or sign in to comment