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

Side by Side Diff: chrome/browser/safe_browsing/chunk_range_unittest.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Test program to convert lists of integers into ranges, and vice versa. 5 // Test program to convert lists of integers into ranges, and vice versa.
6 6
7 #include "chrome/browser/safe_browsing/chunk_range.h" 7 #include "chrome/browser/safe_browsing/chunk_range.h"
8 8
9 #include <stddef.h>
10
9 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
10 12
11 namespace safe_browsing { 13 namespace safe_browsing {
12 14
13 // Test various configurations of chunk numbers. 15 // Test various configurations of chunk numbers.
14 TEST(SafeBrowsingChunkRangeTest, TestChunksToRangeString) { 16 TEST(SafeBrowsingChunkRangeTest, TestChunksToRangeString) {
15 std::vector<int> chunks; 17 std::vector<int> chunks;
16 std::string range_string; 18 std::string range_string;
17 19
18 // Test one chunk range and one single value. 20 // Test one chunk range and one single value.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 EXPECT_TRUE(IsChunkInRange(555, ranges)); 162 EXPECT_TRUE(IsChunkInRange(555, ranges));
161 EXPECT_TRUE(IsChunkInRange(1, ranges)); 163 EXPECT_TRUE(IsChunkInRange(1, ranges));
162 EXPECT_TRUE(IsChunkInRange(1000, ranges)); 164 EXPECT_TRUE(IsChunkInRange(1000, ranges));
163 165
164 EXPECT_FALSE(IsChunkInRange(11, ranges)); 166 EXPECT_FALSE(IsChunkInRange(11, ranges));
165 EXPECT_FALSE(IsChunkInRange(990, ranges)); 167 EXPECT_FALSE(IsChunkInRange(990, ranges));
166 EXPECT_FALSE(IsChunkInRange(2000, ranges)); 168 EXPECT_FALSE(IsChunkInRange(2000, ranges));
167 } 169 }
168 170
169 } // namespace safe_browsing 171 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/chunk_range.cc ('k') | chrome/browser/safe_browsing/client_side_detection_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698