From ba3cc774b8511117e93e1fd06aa062a3c83ab000 Mon Sep 17 00:00:00 2001 From: "csilvers+ctemplate@google.com" Date: Sat, 5 Nov 2011 11:34:19 +0000 Subject: [PATCH] LOG(FATAL) << "message" is preferred over CHECK("message" == NULL). See http://wiki/Main/LogFatalVsCheckFalse for details. While I'm here, fix a couple of cases of CHECK("message" != NULL) and remove some dead code that our compilers are now smart enough to not need. R=falmeida DELTA=5 (0 added, 2 deleted, 3 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=3617 --- src/tests/htmlparser_cpp_test.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/tests/htmlparser_cpp_test.cc b/src/tests/htmlparser_cpp_test.cc index 95fd04b..47c65c1 100644 --- a/src/tests/htmlparser_cpp_test.cc +++ b/src/tests/htmlparser_cpp_test.cc @@ -308,7 +308,7 @@ bool HtmlparserCppTest::StringToBool(const string &value) { } else if (strcasecmp(value.c_str(), "false") == 0) { return false; } else { - CHECK("Unknown boolean value" == NULL); + LOG(FATAL) << "Unknown boolean value"; } } @@ -323,8 +323,7 @@ const char *HtmlparserCppTest::IdToName(const struct IdNameMap *list, } list++; } - CHECK("Unknown id" != NULL); - return NULL; // Unreachable. + LOG(FATAL) << "Unknown id"; } // Returns the enum_id of the correspondent name by consulting an array of @@ -338,8 +337,7 @@ int HtmlparserCppTest::NameToId(const struct IdNameMap *list, } list++; } - CHECK("Unknown name" != NULL); - return -1; // Unreachable. + LOG(FATAL) << "Unknown name"; } // Validate the parser state against the provided state.