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

Unified Diff: tools/gn/test_with_scope.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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: tools/gn/test_with_scope.cc
diff --git a/tools/gn/test_with_scope.cc b/tools/gn/test_with_scope.cc
index b239c640052da0610105d89e6b70df623be44860..1b1618e4f8d18a40cfcb05522226e35e830a8962 100644
--- a/tools/gn/test_with_scope.cc
+++ b/tools/gn/test_with_scope.cc
@@ -60,8 +60,8 @@ bool TestWithScope::ExecuteSnippet(const std::string& str, Err* err) {
return false;
for (size_t i = first_item; i < items_.size(); ++i) {
- CHECK(items_[i]->AsTarget() != nullptr)
- << "Only targets are supported in ExecuteSnippet()";
+ // Only targets are supported in ExecuteSnippet()
+ CHECK(items_[i]->AsTarget() != nullptr);
items_[i]->AsTarget()->SetToolchain(&toolchain_);
if (!items_[i]->OnResolved(err))
return false;
@@ -190,8 +190,8 @@ void TestWithScope::SetCommandForTool(const std::string& cmd, Tool* tool) {
Err err;
SubstitutionPattern command;
command.Parse(cmd, nullptr, &err);
- CHECK(!err.has_error())
- << "Couldn't parse \"" << cmd << "\", " << "got " << err.message();
+ LOG_IF(FATAL, err.has_error()) << "Couldn't parse \"" << cmd << "\", "
+ << "got " << err.message();
tool->set_command(command);
}

Powered by Google App Engine
This is Rietveld 408576698