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

Side by Side Diff: components/safe_browsing_db/safe_browsing_db_util_unittest.cc

Issue 1399843003: Move prefix_set and parts of s_b_util into a new component safe_browsing_db. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use group instead of a static_library for targets that have no sources. Created 5 years, 2 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
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <algorithm>
6
7 #include "components/safe_browsing_db/safe_browsing_db_util.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace {
11
12 TEST(SafeBrowsingDbUtilTest, FullHashOperators) {
13 const SBFullHash kHash1 = SBFullHashForString("one");
14 const SBFullHash kHash2 = SBFullHashForString("two");
15
16 EXPECT_TRUE(SBFullHashEqual(kHash1, kHash1));
17 EXPECT_TRUE(SBFullHashEqual(kHash2, kHash2));
18 EXPECT_FALSE(SBFullHashEqual(kHash1, kHash2));
19 EXPECT_FALSE(SBFullHashEqual(kHash2, kHash1));
20
21 EXPECT_FALSE(SBFullHashLess(kHash1, kHash2));
22 EXPECT_TRUE(SBFullHashLess(kHash2, kHash1));
23
24 EXPECT_FALSE(SBFullHashLess(kHash1, kHash1));
25 EXPECT_FALSE(SBFullHashLess(kHash2, kHash2));
26 }
27
28 } // namespace
OLDNEW
« no previous file with comments | « components/safe_browsing_db/safe_browsing_db_util.cc ('k') | components/test/data/SafeBrowsingDb/PrefixSetRef » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698