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

Unified Diff: tools/gn/parse_tree_unittest.cc

Issue 223783005: Add support for reading .gypi files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/input_file_manager.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/parse_tree_unittest.cc
diff --git a/tools/gn/parse_tree_unittest.cc b/tools/gn/parse_tree_unittest.cc
index 8120e22435d8d26de23230ac035a13f3a1b91a23..4f46232416bb6f9137366067b82494db3b3ad0b4 100644
--- a/tools/gn/parse_tree_unittest.cc
+++ b/tools/gn/parse_tree_unittest.cc
@@ -31,9 +31,9 @@ TEST(ParseTree, Accessor) {
EXPECT_EQ(Value::NONE, result.type());
// Define a as a Scope. It should still fail because b isn't defined.
- Scope a_scope(setup.scope());
err = Err();
- setup.scope()->SetValue("a", Value(NULL, &a_scope), NULL);
+ setup.scope()->SetValue("a",
+ Value(NULL, scoped_ptr<Scope>(new Scope(setup.scope()))), NULL);
result = accessor.Execute(setup.scope(), &err);
EXPECT_TRUE(err.has_error());
EXPECT_EQ(Value::NONE, result.type());
@@ -41,7 +41,8 @@ TEST(ParseTree, Accessor) {
// Define b, accessor should succeed now.
const int64 kBValue = 42;
err = Err();
- a_scope.SetValue("b", Value(NULL, kBValue), NULL);
+ setup.scope()->GetMutableValue("a", false)->scope_value()->SetValue(
+ "b", Value(NULL, kBValue), NULL);
result = accessor.Execute(setup.scope(), &err);
EXPECT_FALSE(err.has_error());
ASSERT_EQ(Value::INTEGER, result.type());
« no previous file with comments | « tools/gn/input_file_manager.cc ('k') | tools/gn/template.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698