| 39 | namespace internal { |
| 40 | |
| 41 | TEST(TDigestTest, SingleValue) { |
| 42 | const double value = 0.12345678; |
| 43 | |
| 44 | TDigest td; |
| 45 | td.Add(value); |
| 46 | ASSERT_OK(td.Validate()); |
| 47 | // all quantiles equal to same single value |
| 48 | for (double q = 0; q <= 1; q += 0.1) { |
| 49 | EXPECT_EQ(td.Quantile(q), value); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | TEST(TDigestTest, FewValues) { |
| 54 | // exact quantile at 0.1 interval, test sorted and unsorted input |
nothing calls this directly
no test coverage detected