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

Unified Diff: util/posix/symbolic_constants_posix_test.cc

Issue 563383002: Add SymbolicConstantsMach 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 | « util/mach/symbolic_constants_mach_test.cc ('k') | util/util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/posix/symbolic_constants_posix_test.cc
diff --git a/util/posix/symbolic_constants_posix_test.cc b/util/posix/symbolic_constants_posix_test.cc
index 7cceaefd143ef1a340b5fc1d9018f66da117e350..a03e8beb116e4ef1ec9c7081c5be7176ba89a870 100644
--- a/util/posix/symbolic_constants_posix_test.cc
+++ b/util/posix/symbolic_constants_posix_test.cc
@@ -21,6 +21,8 @@
#include "base/strings/stringprintf.h"
#include "gtest/gtest.h"
+#define NUL_TEST_DATA(string) { string, arraysize(string) - 1 }
+
namespace {
using namespace crashpad;
@@ -67,10 +69,10 @@ const struct {
#endif
};
-// If expect is NULL, the conversion is expected to fail. If expect is empty,
-// the conversion is expected to succeed, but the precise returned string value
-// is unknown. Otherwise, the conversion is expected to succeed, and expect
-// contains the precise expected string value to be returned.
+// If |expect| is NULL, the conversion is expected to fail. If |expect| is
+// empty, the conversion is expected to succeed, but the precise returned string
+// value is unknown. Otherwise, the conversion is expected to succeed, and
+// |expect| contains the precise expected string value to be returned.
//
// Only set kUseFullName or kUseShortName when calling this. Other options are
// exercised directly by this function.
@@ -164,7 +166,8 @@ TEST(SymbolicConstantsPOSIX, StringToSignal) {
kAllowFullName | kAllowShortName | kAllowNumber,
};
- for (size_t option_index = 0; option_index < arraysize(kOptions);
+ for (size_t option_index = 0;
+ option_index < arraysize(kOptions);
++option_index) {
SCOPED_TRACE(base::StringPrintf("option_index %zu", option_index));
StringToSymbolicConstantOptions options = kOptions[option_index];
@@ -215,7 +218,6 @@ TEST(SymbolicConstantsPOSIX, StringToSignal) {
const char* string;
size_t length;
} kNULTestData[] = {
-#define NUL_TEST_DATA(string) { string, arraysize(string) - 1 }
NUL_TEST_DATA("\0SIGBUS"),
NUL_TEST_DATA("SIG\0BUS"),
NUL_TEST_DATA("SIGB\0US"),
@@ -226,7 +228,6 @@ TEST(SymbolicConstantsPOSIX, StringToSignal) {
NUL_TEST_DATA("\0002"),
NUL_TEST_DATA("2\0"),
NUL_TEST_DATA("1\0002"),
-#undef NUL_TEST_DATA
};
for (size_t index = 0; index < arraysize(kNULTestData); ++index) {
« no previous file with comments | « util/mach/symbolic_constants_mach_test.cc ('k') | util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698