OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 <string> |
| 6 |
| 7 #include "chrome/browser/metrics/rappord.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace { |
| 11 |
| 12 // Validate that we generate some bits for a string. |
| 13 TEST(RappordTest, GetBits) { |
| 14 typedef RappordBloomFilter<128, 4, -4, 2, -4> rappord_t; |
| 15 |
| 16 rappord_t rappord(10, "MySecretClientId"); |
| 17 rappord_t::bitmap_t bits = rappord.get("MyString"); |
| 18 EXPECT_EQ((long unsigned int)128, bits.to_string().length()); |
| 19 } |
| 20 |
| 21 } |
OLD | NEW |