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

Unified Diff: base/i18n/number_formatting_unittest.cc

Issue 1542323002: Switch to standard integer types in base/i18n/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: header 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 | « base/i18n/number_formatting.cc ('k') | base/i18n/rtl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/number_formatting_unittest.cc
diff --git a/base/i18n/number_formatting_unittest.cc b/base/i18n/number_formatting_unittest.cc
index dc6de2bbb6dc0b96b01d430d8b1957a407274f09..31341ac25e421013cadc0835056d079a54bfbd83 100644
--- a/base/i18n/number_formatting_unittest.cc
+++ b/base/i18n/number_formatting_unittest.cc
@@ -2,12 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include <limits>
#include "base/i18n/number_formatting.h"
#include "base/i18n/rtl.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/icu_test_util.h"
+#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/icu/source/i18n/unicode/usearch.h"
@@ -16,15 +21,15 @@ namespace {
TEST(NumberFormattingTest, FormatNumber) {
static const struct {
- int64 number;
+ int64_t number;
const char* expected_english;
const char* expected_german;
} cases[] = {
{0, "0", "0"},
{1024, "1,024", "1.024"},
- {std::numeric_limits<int64>::max(),
+ {std::numeric_limits<int64_t>::max(),
"9,223,372,036,854,775,807", "9.223.372.036.854.775.807"},
- {std::numeric_limits<int64>::min(),
+ {std::numeric_limits<int64_t>::min(),
"-9,223,372,036,854,775,808", "-9.223.372.036.854.775.808"},
{-42, "-42", "-42"},
};
« no previous file with comments | « base/i18n/number_formatting.cc ('k') | base/i18n/rtl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698