mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
tests: histogram prevent re-use of local variables
By moving the test to a separate function. http://tracker.ceph.com/issues/9235 Fixes: #9235 Signed-off-by: Loic Dachary <loic-201408@dachary.org>
This commit is contained in:
parent
78cbe11513
commit
ee02293ad2
@ -93,15 +93,17 @@ TEST(Histogram, Position) {
|
||||
ASSERT_EQ(500000u, lb);
|
||||
ASSERT_EQ(500000u, ub);
|
||||
}
|
||||
{
|
||||
pow2_hist_t h;
|
||||
h.h.resize(10, 0);
|
||||
h.h[0] = UINT_MAX;
|
||||
h.h[5] = UINT_MAX;
|
||||
uint64_t lb, ub;
|
||||
ASSERT_EQ(500000u, lb);
|
||||
ASSERT_EQ(500000u, ub);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Histogram, Position2) {
|
||||
pow2_hist_t h;
|
||||
h.h.resize(10, 0);
|
||||
h.h[0] = UINT_MAX;
|
||||
h.h[5] = UINT_MAX;
|
||||
uint64_t lb, ub;
|
||||
h.get_position_micro(4, &lb, &ub);
|
||||
ASSERT_EQ(500000u, lb);
|
||||
ASSERT_EQ(500000u, ub);
|
||||
}
|
||||
|
||||
TEST(Histogram, Decay) {
|
||||
|
Loading…
Reference in New Issue
Block a user