Skip to content

Commit 01185f0

Browse files
committed
[hist] Add missing checks in test of RHist.FillWeight
1 parent 38650b6 commit 01185f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hist/histv7/test/hist_hist.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ TEST(RHist, FillWeight)
120120
hist.Fill(8.5, RWeight(0.8));
121121
hist.Fill(std::make_tuple(9.5), RWeight(0.9));
122122

123+
EXPECT_FLOAT_EQ(hist.GetBinContent(RBinIndex(8)), 0.8);
124+
std::array<RBinIndex, 1> indices = {9};
125+
EXPECT_FLOAT_EQ(hist.GetBinContent(indices), 0.9);
126+
123127
EXPECT_EQ(hist.GetStats().GetNEntries(), 2);
124128
// Cross-checked with TH1
125129
EXPECT_FLOAT_EQ(hist.GetStats().ComputeNEffectiveEntries(), 1.9931034);

0 commit comments

Comments
 (0)