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

Unified Diff: tools/gn/functions_target_unittest.cc

Issue 2481423002: Convert gn docstrings to C++11 raw strings. (Closed)
Patch Set: Fixes Created 4 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
« no previous file with comments | « tools/gn/functions_target.cc ('k') | tools/gn/input_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/functions_target_unittest.cc
diff --git a/tools/gn/functions_target_unittest.cc b/tools/gn/functions_target_unittest.cc
index f4eeb38075c40d23eca76af828a442c69f2156fc..525bc7cbdb809e2eef2872e3935da64c4d219f88 100644
--- a/tools/gn/functions_target_unittest.cc
+++ b/tools/gn/functions_target_unittest.cc
@@ -50,21 +50,21 @@ TEST(FunctionsTarget, TemplateDefaults) {
// Test a good one first.
TestParseInput good_input(
- // Make a template with defaults set.
- "template(\"my_templ\") {\n"
- " source_set(target_name) {\n"
- " forward_variables_from(invoker, \"*\")\n"
- " }\n"
- "}\n"
- "set_defaults(\"my_templ\") {\n"
- " default_value = 1\n"
- "}\n"
+ R"(# Make a template with defaults set.
+ template("my_templ") {
+ source_set(target_name) {
+ forward_variables_from(invoker, "*")
+ }
+ }
+ set_defaults("my_templ") {
+ default_value = 1
+ }
- // Invoke the template with target(). This will fail to execute if the
- // defaults were not set properly, because "default_value" won't exist.
- "target(\"my_templ\", \"foo\") {\n"
- " print(default_value)\n"
- "}\n");
+ # Invoke the template with target(). This will fail to execute if the
+ # defaults were not set properly, because "default_value" won't exist.
+ target("my_templ", "foo") {
+ print(default_value)
+ })");
ASSERT_FALSE(good_input.has_error());
Err err;
good_input.parsed()->Execute(setup.scope(), &err);
« no previous file with comments | « tools/gn/functions_target.cc ('k') | tools/gn/input_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698