| Index: util/mach/exc_client_variants_test.cc
|
| diff --git a/util/mach/exc_client_variants_test.cc b/util/mach/exc_client_variants_test.cc
|
| index c8692ab9bfb10c8a5ae1d82cc8876315ba6d77ae..3f2926904f67f101e3afb12434c0896526c84f56 100644
|
| --- a/util/mach/exc_client_variants_test.cc
|
| +++ b/util/mach/exc_client_variants_test.cc
|
| @@ -87,8 +87,16 @@ class TestExcClientVariants : public UniversalMachExcServer,
|
|
|
| EXPECT_EQ(exception_, exception);
|
| EXPECT_EQ(2u, code_count);
|
| - EXPECT_EQ(expect_code, code[0]);
|
| - EXPECT_EQ(expect_subcode, code[1]);
|
| +
|
| + // The code_count check above would ideally use ASSERT_EQ so that the next
|
| + // conditionals would not be necessary, but ASSERT_* requires a function
|
| + // returning type void, and the interface dictates otherwise here.
|
| + if (code_count >= 1) {
|
| + EXPECT_EQ(expect_code, code[0]);
|
| + }
|
| + if (code_count >= 2) {
|
| + EXPECT_EQ(expect_subcode, code[1]);
|
| + }
|
|
|
| if (HasState()) {
|
| EXPECT_EQ(exception_ + 10, *flavor);
|
|
|