Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bbd2a0d7 authored by Yifan Hong's avatar Yifan Hong
Browse files

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
parent a416e7b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment