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

Unified Diff: util/mach/symbolic_constants_mach_test.cc

Issue 700383007: Use implicit_cast<> instead of static_cast<> whenever possible (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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
Index: util/mach/symbolic_constants_mach_test.cc
diff --git a/util/mach/symbolic_constants_mach_test.cc b/util/mach/symbolic_constants_mach_test.cc
index 3ac09f24f76c5a953af8ec23b08798834857b0bf..6878cbf8ebd66d906b78856535f5e797998723dc 100644
--- a/util/mach/symbolic_constants_mach_test.cc
+++ b/util/mach/symbolic_constants_mach_test.cc
@@ -537,16 +537,16 @@ const struct {
{EXCEPTION_DEFAULT, "EXCEPTION_DEFAULT", "DEFAULT"},
{EXCEPTION_STATE, "EXCEPTION_STATE", "STATE"},
{EXCEPTION_STATE_IDENTITY, "EXCEPTION_STATE_IDENTITY", "STATE_IDENTITY"},
- {static_cast<exception_behavior_t>(EXCEPTION_DEFAULT |
- MACH_EXCEPTION_CODES),
+ {implicit_cast<exception_behavior_t>(EXCEPTION_DEFAULT |
+ MACH_EXCEPTION_CODES),
"EXCEPTION_DEFAULT|MACH_EXCEPTION_CODES",
"DEFAULT|MACH"},
- {static_cast<exception_behavior_t>(EXCEPTION_STATE |
- MACH_EXCEPTION_CODES),
+ {implicit_cast<exception_behavior_t>(EXCEPTION_STATE |
+ MACH_EXCEPTION_CODES),
"EXCEPTION_STATE|MACH_EXCEPTION_CODES",
"STATE|MACH"},
- {static_cast<exception_behavior_t>(EXCEPTION_STATE_IDENTITY |
- MACH_EXCEPTION_CODES),
+ {implicit_cast<exception_behavior_t>(EXCEPTION_STATE_IDENTITY |
+ MACH_EXCEPTION_CODES),
"EXCEPTION_STATE_IDENTITY|MACH_EXCEPTION_CODES",
"STATE_IDENTITY|MACH"},
};
@@ -699,26 +699,26 @@ TEST(SymbolicConstantsMach, StringToExceptionBehavior) {
} kNonCanonicalTestData[] = {
{"MACH_EXCEPTION_CODES|EXCEPTION_STATE_IDENTITY",
kAllowFullName,
- static_cast<exception_behavior_t>(EXCEPTION_STATE_IDENTITY |
- MACH_EXCEPTION_CODES)},
+ implicit_cast<exception_behavior_t>(EXCEPTION_STATE_IDENTITY |
+ MACH_EXCEPTION_CODES)},
{"MACH|STATE_IDENTITY",
kAllowShortName,
- static_cast<exception_behavior_t>(EXCEPTION_STATE_IDENTITY |
- MACH_EXCEPTION_CODES)},
+ implicit_cast<exception_behavior_t>(EXCEPTION_STATE_IDENTITY |
+ MACH_EXCEPTION_CODES)},
{"MACH_EXCEPTION_CODES|STATE",
kAllowFullName | kAllowShortName,
- static_cast<exception_behavior_t>(EXCEPTION_STATE |
- MACH_EXCEPTION_CODES)},
+ implicit_cast<exception_behavior_t>(EXCEPTION_STATE |
+ MACH_EXCEPTION_CODES)},
{"MACH|EXCEPTION_STATE",
kAllowFullName | kAllowShortName,
- static_cast<exception_behavior_t>(EXCEPTION_STATE |
- MACH_EXCEPTION_CODES)},
+ implicit_cast<exception_behavior_t>(EXCEPTION_STATE |
+ MACH_EXCEPTION_CODES)},
{"3|MACH_EXCEPTION_CODES",
kAllowFullName | kAllowNumber,
- static_cast<exception_behavior_t>(MACH_EXCEPTION_CODES | 3)},
+ implicit_cast<exception_behavior_t>(MACH_EXCEPTION_CODES | 3)},
{"MACH|0x2",
kAllowShortName | kAllowNumber,
- static_cast<exception_behavior_t>(MACH_EXCEPTION_CODES | 0x2)},
+ implicit_cast<exception_behavior_t>(MACH_EXCEPTION_CODES | 0x2)},
};
for (size_t index = 0; index < arraysize(kNonCanonicalTestData); ++index) {

Powered by Google App Engine
This is Rietveld 408576698