| Index: chrome/browser/metrics/rappord_unittest.cc
|
| diff --git a/chrome/browser/metrics/rappord_unittest.cc b/chrome/browser/metrics/rappord_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c189c2d6da45b2afd3ff84036cc0c034821f5cd5
|
| --- /dev/null
|
| +++ b/chrome/browser/metrics/rappord_unittest.cc
|
| @@ -0,0 +1,21 @@
|
| +// Copyright (c) 2012 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 <string>
|
| +
|
| +#include "chrome/browser/metrics/rappord.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace {
|
| +
|
| +// Validate that we generate some bits for a string.
|
| +TEST(RappordTest, GetBits) {
|
| + typedef RappordBloomFilter<128, 4, -4, 2, -4> rappord_t;
|
| +
|
| + rappord_t rappord(10, "MySecretClientId");
|
| + rappord_t::bitmap_t bits = rappord.get("MyString");
|
| + EXPECT_EQ((long unsigned int)128, bits.to_string().length());
|
| +}
|
| +
|
| +}
|
|
|