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

Side by Side Diff: tools/gn/operators_unittest.cc

Issue 1549203002: Switch to standard integer types in tools/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « tools/gn/operators.cc ('k') | tools/gn/ordered_set.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h>
6
5 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
6 #include "tools/gn/operators.h" 8 #include "tools/gn/operators.h"
7 #include "tools/gn/parse_tree.h" 9 #include "tools/gn/parse_tree.h"
8 #include "tools/gn/pattern.h" 10 #include "tools/gn/pattern.h"
9 #include "tools/gn/test_with_scope.h" 11 #include "tools/gn/test_with_scope.h"
10 12
11 namespace { 13 namespace {
12 14
13 bool IsValueIntegerEqualing(const Value& v, int64 i) { 15 bool IsValueIntegerEqualing(const Value& v, int64_t i) {
14 if (v.type() != Value::INTEGER) 16 if (v.type() != Value::INTEGER)
15 return false; 17 return false;
16 return v.int_value() == i; 18 return v.int_value() == i;
17 } 19 }
18 20
19 bool IsValueStringEqualing(const Value& v, const char* s) { 21 bool IsValueStringEqualing(const Value& v, const char* s) {
20 if (v.type() != Value::STRING) 22 if (v.type() != Value::STRING)
21 return false; 23 return false;
22 return v.string_value() == s; 24 return v.string_value() == s;
23 } 25 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 196
195 // Set right as foo, but don't define a value for it. 197 // Set right as foo, but don't define a value for it.
196 const char foo[] = "foo"; 198 const char foo[] = "foo";
197 Token identifier_token(Location(), Token::IDENTIFIER, foo); 199 Token identifier_token(Location(), Token::IDENTIFIER, foo);
198 node.set_right(scoped_ptr<ParseNode>(new IdentifierNode(identifier_token))); 200 node.set_right(scoped_ptr<ParseNode>(new IdentifierNode(identifier_token)));
199 201
200 Value ret = ExecuteBinaryOperator(setup.scope(), &node, node.left(), 202 Value ret = ExecuteBinaryOperator(setup.scope(), &node, node.left(),
201 node.right(), &err); 203 node.right(), &err);
202 EXPECT_FALSE(err.has_error()); 204 EXPECT_FALSE(err.has_error());
203 } 205 }
OLDNEW
« no previous file with comments | « tools/gn/operators.cc ('k') | tools/gn/ordered_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698