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

Side by Side Diff: components/rappor/rappor_metric_unittest.cc

Issue 188103004: C++ Readability review for holte (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added header files Created 6 years, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Change for readability
6
5 #include "components/rappor/rappor_metric.h" 7 #include "components/rappor/rappor_metric.h"
6 8
7 #include <stdlib.h> 9 #include <stdlib.h>
8 10
9 #include "base/rand_util.h" 11 #include "base/rand_util.h"
10 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
11 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
12 14
13 namespace rappor { 15 namespace rappor {
14 16
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // stats.binom(152, 0.65625).ppf(0.999995) = 124 90 // stats.binom(152, 0.65625).ppf(0.999995) = 124
89 EXPECT_LE(true_from_true_count, 124); 91 EXPECT_LE(true_from_true_count, 124);
90 92
91 // stats.binom(248, 0.59375).ppf(.000005) = 113 93 // stats.binom(248, 0.59375).ppf(.000005) = 113
92 EXPECT_GT(true_from_false_count, 113); 94 EXPECT_GT(true_from_false_count, 113);
93 // stats.binom(248, 0.59375).ppf(.999995) = 181 95 // stats.binom(248, 0.59375).ppf(.999995) = 181
94 EXPECT_LE(true_from_false_count, 181); 96 EXPECT_LE(true_from_false_count, 181);
95 } 97 }
96 98
97 } // namespace rappor 99 } // namespace rappor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698