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

Unified Diff: tools/gn/value_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 5 years 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/value_extractors.cc ('k') | tools/imagediff/image_diff.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value_unittest.cc
diff --git a/tools/gn/value_unittest.cc b/tools/gn/value_unittest.cc
index f934e6601812ec48e3caf8b6c8592a83bd3de12f..75f9f607097132147acdaf1f0be27c8779e3a2a6 100644
--- a/tools/gn/value_unittest.cc
+++ b/tools/gn/value_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "tools/gn/test_with_scope.h"
#include "tools/gn/value.h"
@@ -23,7 +25,7 @@ TEST(Value, ToString) {
listval.list_value().push_back(Value(nullptr, "hi\"me"));
listval.list_value().push_back(Value(nullptr, true));
listval.list_value().push_back(Value(nullptr, false));
- listval.list_value().push_back(Value(nullptr, static_cast<int64>(42)));
+ listval.list_value().push_back(Value(nullptr, static_cast<int64_t>(42)));
// Printing lists always causes embedded strings to be quoted (ignoring the
// quote flag), or else they wouldn't make much sense.
EXPECT_EQ("[\"hi\\\"me\", true, false, 42]", listval.ToString(false));
@@ -35,7 +37,7 @@ TEST(Value, ToString) {
Value scopeval(nullptr, scoped_ptr<Scope>(scope));
EXPECT_EQ("{ }", scopeval.ToString(false));
- scope->SetValue("a", Value(nullptr, static_cast<int64>(42)), nullptr);
+ scope->SetValue("a", Value(nullptr, static_cast<int64_t>(42)), nullptr);
scope->SetValue("b", Value(nullptr, "hello, world"), nullptr);
EXPECT_EQ("{\n a = 42\n b = \"hello, world\"\n}", scopeval.ToString(false));
}
« no previous file with comments | « tools/gn/value_extractors.cc ('k') | tools/imagediff/image_diff.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698