| Index: components/safe_browsing_db/safe_browsing_db_util_unittest.cc
|
| diff --git a/components/safe_browsing_db/safe_browsing_db_util_unittest.cc b/components/safe_browsing_db/safe_browsing_db_util_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9af7d58cff9bb1fa0772c65180c57405ea02a79e
|
| --- /dev/null
|
| +++ b/components/safe_browsing_db/safe_browsing_db_util_unittest.cc
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include <algorithm>
|
| +
|
| +#include "components/safe_browsing_db/safe_browsing_db_util.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace {
|
| +
|
| +TEST(SafeBrowsingDbUtilTest, FullHashOperators) {
|
| + const SBFullHash kHash1 = SBFullHashForString("one");
|
| + const SBFullHash kHash2 = SBFullHashForString("two");
|
| +
|
| + EXPECT_TRUE(SBFullHashEqual(kHash1, kHash1));
|
| + EXPECT_TRUE(SBFullHashEqual(kHash2, kHash2));
|
| + EXPECT_FALSE(SBFullHashEqual(kHash1, kHash2));
|
| + EXPECT_FALSE(SBFullHashEqual(kHash2, kHash1));
|
| +
|
| + EXPECT_FALSE(SBFullHashLess(kHash1, kHash2));
|
| + EXPECT_TRUE(SBFullHashLess(kHash2, kHash1));
|
| +
|
| + EXPECT_FALSE(SBFullHashLess(kHash1, kHash1));
|
| + EXPECT_FALSE(SBFullHashLess(kHash2, kHash2));
|
| +}
|
| +
|
| +} // namespace
|
|
|