Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: util/mach/exc_client_variants_test.cc

Issue 549023005: Add ExceptionPorts and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | util/mach/exc_server_variants_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | util/mach/exc_server_variants_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698