OLD | NEW |
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 Loading... |
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 |
OLD | NEW |