summaryrefslogtreecommitdiff
path: root/init/service_utils.cpp
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2020-02-06 02:51:42 +0900
committerBernie Innocenti <codewiz@google.com>2020-02-06 15:27:26 +0900
commitbeffc028d699f0493707ee930d3a94af0790c974 (patch)
tree6a776cff512ad10b9a7c308295ba06b27d452df4 /init/service_utils.cpp
parent4adfde41eae5b31724ec6092c1405b2913ab535c (diff)
Add macros to check for successful Result
These macros are meant to be used in tests: Result<File> maybe_a_file = OpenFile(...); EXPECT_OK(maybe_a_file); On failure, the error is printed. There's no equivalent EXPECT_NOT_OK() because it is a testing anti-pattern which causes tests to pass even when the error changed as a result of a regression. Use EPECT_EQ(result, Error(...)) instead. Test: cd system/core && atest Test: m Change-Id: Ie26f90d3c62620e7b1f10013829ba43ef5364fe1
Diffstat (limited to 'init/service_utils.cpp')
0 files changed, 0 insertions, 0 deletions