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

Unified Diff: tools/gn/scope_unittest.cc

Issue 2187523003: Allow creation and modification of scopes in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 4 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 | « tools/gn/scope.cc ('k') | tools/gn/template.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scope_unittest.cc
diff --git a/tools/gn/scope_unittest.cc b/tools/gn/scope_unittest.cc
index de2005a5144e8e19f903568ed8957807acf1aeda..a90d725d8dfb4326a0502f55cb8f5d34e133bfe1 100644
--- a/tools/gn/scope_unittest.cc
+++ b/tools/gn/scope_unittest.cc
@@ -262,10 +262,12 @@ TEST(Scope, GetMutableValue) {
// Check getting root scope values.
EXPECT_TRUE(mutable_scope2.GetValue(kOnConst, true));
- EXPECT_FALSE(mutable_scope2.GetMutableValue(kOnConst, true));
+ EXPECT_FALSE(mutable_scope2.GetMutableValue(
+ kOnConst, Scope::SEARCH_NESTED, true));
// Test reading a value from scope 1.
- Value* mutable1_result = mutable_scope2.GetMutableValue(kOnMutable1, false);
+ Value* mutable1_result = mutable_scope2.GetMutableValue(
+ kOnMutable1, Scope::SEARCH_NESTED, false);
ASSERT_TRUE(mutable1_result);
EXPECT_TRUE(*mutable1_result == value);
@@ -273,13 +275,15 @@ TEST(Scope, GetMutableValue) {
// used in the previous step).
Err err;
EXPECT_FALSE(mutable_scope1.CheckForUnusedVars(&err));
- mutable1_result = mutable_scope2.GetMutableValue(kOnMutable1, true);
+ mutable1_result = mutable_scope2.GetMutableValue(
+ kOnMutable1, Scope::SEARCH_NESTED, true);
EXPECT_TRUE(mutable1_result);
err = Err();
EXPECT_TRUE(mutable_scope1.CheckForUnusedVars(&err));
// Test reading a value from scope 2.
- Value* mutable2_result = mutable_scope2.GetMutableValue(kOnMutable2, true);
+ Value* mutable2_result = mutable_scope2.GetMutableValue(
+ kOnMutable2, Scope::SEARCH_NESTED, true);
ASSERT_TRUE(mutable2_result);
EXPECT_TRUE(*mutable2_result == value);
}
« no previous file with comments | « tools/gn/scope.cc ('k') | tools/gn/template.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698