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

Unified Diff: base/strings/string_number_conversions_unittest.cc

Issue 1128203010: base: Remove the remaining usage GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 7 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 | « base/rand_util.cc ('k') | base/time/time_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_number_conversions_unittest.cc
diff --git a/base/strings/string_number_conversions_unittest.cc b/base/strings/string_number_conversions_unittest.cc
index 4787614061ac4145d8b9a448c5714d843b5f8585..0bc72f17ca10d48e0d9945e786c30c05e056b990 100644
--- a/base/strings/string_number_conversions_unittest.cc
+++ b/base/strings/string_number_conversions_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 "base/strings/string_number_conversions.h"
+
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
@@ -10,7 +12,6 @@
#include <limits>
#include "base/format_macros.h"
-#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -237,10 +238,10 @@ TEST(StringNumberConversionsTest, StringToInt64) {
{"42", 42, true},
{"-2147483648", INT_MIN, true},
{"2147483647", INT_MAX, true},
- {"-2147483649", GG_INT64_C(-2147483649), true},
- {"-99999999999", GG_INT64_C(-99999999999), true},
- {"2147483648", GG_INT64_C(2147483648), true},
- {"99999999999", GG_INT64_C(99999999999), true},
+ {"-2147483649", INT64_C(-2147483649), true},
+ {"-99999999999", INT64_C(-99999999999), true},
+ {"2147483648", INT64_C(2147483648), true},
+ {"99999999999", INT64_C(99999999999), true},
{"9223372036854775807", kint64max, true},
{"-9223372036854775808", kint64min, true},
{"09", 9, true},
@@ -304,8 +305,8 @@ TEST(StringNumberConversionsTest, StringToUint64) {
{"2147483647", INT_MAX, true},
{"-2147483649", 0, false},
{"-99999999999", 0, false},
- {"2147483648", GG_UINT64_C(2147483648), true},
- {"99999999999", GG_UINT64_C(99999999999), true},
+ {"2147483648", UINT64_C(2147483648), true},
+ {"99999999999", UINT64_C(99999999999), true},
{"9223372036854775807", kint64max, true},
{"-9223372036854775808", 0, false},
{"09", 9, true},
@@ -327,7 +328,7 @@ TEST(StringNumberConversionsTest, StringToUint64) {
{"-", 0, false},
{"-9223372036854775809", 0, false},
{"-99999999999999999999", 0, false},
- {"9223372036854775808", GG_UINT64_C(9223372036854775808), true},
+ {"9223372036854775808", UINT64_C(9223372036854775808), true},
{"99999999999999999999", kuint64max, false},
{"18446744073709551615", kuint64max, true},
{"18446744073709551616", kuint64max, false},
@@ -550,7 +551,7 @@ TEST(StringNumberConversionsTest, HexStringToInt64) {
{"42", 66, true},
{"-42", -66, true},
{"+42", 66, true},
- {"40acd88557b", GG_INT64_C(4444444448123), true},
+ {"40acd88557b", INT64_C(4444444448123), true},
{"7fffffff", INT_MAX, true},
{"-80000000", INT_MIN, true},
{"ffffffff", 0xffffffff, true},
@@ -558,7 +559,7 @@ TEST(StringNumberConversionsTest, HexStringToInt64) {
{"0x42", 66, true},
{"-0x42", -66, true},
{"+0x42", 66, true},
- {"0x40acd88557b", GG_INT64_C(4444444448123), true},
+ {"0x40acd88557b", INT64_C(4444444448123), true},
{"0x7fffffff", INT_MAX, true},
{"-0x80000000", INT_MIN, true},
{"0xffffffff", 0xffffffff, true},
@@ -607,7 +608,7 @@ TEST(StringNumberConversionsTest, HexStringToUInt64) {
{"42", 66, true},
{"-42", 0, false},
{"+42", 66, true},
- {"40acd88557b", GG_INT64_C(4444444448123), true},
+ {"40acd88557b", INT64_C(4444444448123), true},
{"7fffffff", INT_MAX, true},
{"-80000000", 0, false},
{"ffffffff", 0xffffffff, true},
@@ -615,14 +616,14 @@ TEST(StringNumberConversionsTest, HexStringToUInt64) {
{"0x42", 66, true},
{"-0x42", 0, false},
{"+0x42", 66, true},
- {"0x40acd88557b", GG_INT64_C(4444444448123), true},
+ {"0x40acd88557b", INT64_C(4444444448123), true},
{"0x7fffffff", INT_MAX, true},
{"-0x80000000", 0, false},
{"0xffffffff", 0xffffffff, true},
{"0XDeadBeef", 0xdeadbeef, true},
{"0x7fffffffffffffff", kint64max, true},
{"-0x8000000000000000", 0, false},
- {"0x8000000000000000", GG_UINT64_C(0x8000000000000000), true},
+ {"0x8000000000000000", UINT64_C(0x8000000000000000), true},
{"-0x8000000000000001", 0, false},
{"0xFFFFFFFFFFFFFFFF", kuint64max, true},
{"FFFFFFFFFFFFFFFF", kuint64max, true},
« no previous file with comments | « base/rand_util.cc ('k') | base/time/time_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698