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

Side by Side Diff: third_party/WebKit/Source/wtf/text/StringToNumberTest.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "wtf/text/StringToNumber.h" 5 #include "wtf/text/StringToNumber.h"
6 6
7 #include <cstring>
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include <cstring>
9 9
10 namespace WTF { 10 namespace WTF {
11 11
12 TEST(StringToNumberTest, TestCharactersToIntStrict) { 12 TEST(StringToNumberTest, TestCharactersToIntStrict) {
13 #define EXPECT_VALID(string, expectedValue, base) \ 13 #define EXPECT_VALID(string, expectedValue, base) \
14 do { \ 14 do { \
15 bool ok; \ 15 bool ok; \
16 int value = charactersToIntStrict(reinterpret_cast<const LChar*>(string), \ 16 int value = charactersToIntStrict(reinterpret_cast<const LChar*>(string), \
17 std::strlen(string), &ok, base); \ 17 std::strlen(string), &ok, base); \
18 EXPECT_TRUE(ok); \ 18 EXPECT_TRUE(ok); \
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 EXPECT_INVALID_HEXADECIMAL("-ffffffff"); 117 EXPECT_INVALID_HEXADECIMAL("-ffffffff");
118 118
119 #undef EXPECT_VALID_DECIMAL 119 #undef EXPECT_VALID_DECIMAL
120 #undef EXPECT_INVALID_DECIMAL 120 #undef EXPECT_INVALID_DECIMAL
121 #undef EXPECT_VALID_HEXADECIMAL 121 #undef EXPECT_VALID_HEXADECIMAL
122 #undef EXPECT_INVALID_HEXADECIMAL 122 #undef EXPECT_INVALID_HEXADECIMAL
123 #undef EXPECT_VALID 123 #undef EXPECT_VALID
124 #undef EXPECT_INVALID 124 #undef EXPECT_INVALID
125 } 125 }
126 } 126 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringToNumber.cpp ('k') | third_party/WebKit/Source/wtf/text/StringView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698