MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/util/tdigest_test.cc:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace internal {
40
41TEST(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
53TEST(TDigestTest, FewValues) {
54 // exact quantile at 0.1 interval, test sorted and unsorted input

Callers

nothing calls this directly

Calls 9

TestRandomFunction · 0.85
random_realFunction · 0.85
TestMergeFunction · 0.85
ExactQuantileFunction · 0.85
push_backMethod · 0.80
AddMethod · 0.45
ValidateMethod · 0.45
QuantileMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected