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

Side by Side Diff: chrome/browser/metrics/rappord_unittest.cc

Issue 49753002: RAPPOR implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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) 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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698