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

Unified Diff: tools/gn/operators_unittest.cc

Issue 656093004: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/functions_unittest.cc ('k') | tools/gn/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/operators_unittest.cc
diff --git a/tools/gn/operators_unittest.cc b/tools/gn/operators_unittest.cc
index 2ad91b8718b09306d1389bbf9123b639eb7c26e0..d2af8b13f3827f20cdab85e6aebb28bd48d68e04 100644
--- a/tools/gn/operators_unittest.cc
+++ b/tools/gn/operators_unittest.cc
@@ -59,21 +59,21 @@ TEST(Operators, SourcesAppend) {
// Append an integer.
const char integer_value[] = "5";
Token integer(Location(), Token::INTEGER, integer_value);
- node.set_right(ListWithLiteral(integer).PassAs<ParseNode>());
+ node.set_right(ListWithLiteral(integer));
node.Execute(setup.scope(), &err);
EXPECT_FALSE(err.has_error());
// Append a string that doesn't match the pattern, it should get appended.
const char string_1_value[] = "\"good\"";
Token string_1(Location(), Token::STRING, string_1_value);
- node.set_right(ListWithLiteral(string_1).PassAs<ParseNode>());
+ node.set_right(ListWithLiteral(string_1));
node.Execute(setup.scope(), &err);
EXPECT_FALSE(err.has_error());
// Append a string that does match the pattern, it should be a no-op.
const char string_2_value[] = "\"foo-rm\"";
Token string_2(Location(), Token::STRING, string_2_value);
- node.set_right(ListWithLiteral(string_2).PassAs<ParseNode>());
+ node.set_right(ListWithLiteral(string_2));
node.Execute(setup.scope(), &err);
EXPECT_FALSE(err.has_error());
@@ -118,8 +118,8 @@ TEST(Operators, ListAppend) {
scoped_ptr<ListNode> outer_list(new ListNode);
const char twelve_str[] = "12";
Token twelve(Location(), Token::INTEGER, twelve_str);
- outer_list->append_item(ListWithLiteral(twelve).PassAs<ParseNode>());
- node.set_right(outer_list.PassAs<ParseNode>());
+ outer_list->append_item(ListWithLiteral(twelve));
+ node.set_right(outer_list.Pass());
Value ret = ExecuteBinaryOperator(setup.scope(), &node, node.left(),
node.right(), &err);
« no previous file with comments | « tools/gn/functions_unittest.cc ('k') | tools/gn/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698