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

Side by Side Diff: chrome/browser/spellchecker/word_trimmer_unittest.cc

Issue 1545223002: Switch to standard integer types in chrome/browser/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/spellchecker/word_trimmer.h" 5 #include "chrome/browser/spellchecker/word_trimmer.h"
6 6
7 #include <stddef.h>
8
7 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 using base::ASCIIToUTF16; 12 using base::ASCIIToUTF16;
11 13
12 TEST(WordTrimmerTest, TrimWordsEmptyText) { 14 TEST(WordTrimmerTest, TrimWordsEmptyText) {
13 size_t start = 0; 15 size_t start = 0;
14 size_t end = 0; 16 size_t end = 0;
15 EXPECT_EQ(base::string16(), TrimWords(&start, end, base::string16(), 0)); 17 EXPECT_EQ(base::string16(), TrimWords(&start, end, base::string16(), 0));
16 EXPECT_EQ(0UL, start); 18 EXPECT_EQ(0UL, start);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 EXPECT_EQ(4UL, start); 58 EXPECT_EQ(4UL, start);
57 } 59 }
58 60
59 TEST(WordTrimmerTest, TrimWordsInvalid) { 61 TEST(WordTrimmerTest, TrimWordsInvalid) {
60 size_t start = 23; 62 size_t start = 23;
61 size_t end = 14; 63 size_t end = 14;
62 EXPECT_EQ(ASCIIToUTF16("one two three four five six seven eight"), TrimWords( 64 EXPECT_EQ(ASCIIToUTF16("one two three four five six seven eight"), TrimWords(
63 &start, end, ASCIIToUTF16("one two three four five six seven eight"), 2)); 65 &start, end, ASCIIToUTF16("one two three four five six seven eight"), 2));
64 EXPECT_EQ(23UL, start); 66 EXPECT_EQ(23UL, start);
65 } 67 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/word_trimmer.h ('k') | chrome/browser/ssl/bad_clock_blocking_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698