Skip to content

Commit 9f5dd4b

Browse files
committed
[RF] Avoid setting out-of-range value in NaNPacker tests
This would clip to the nearest in-range value anyway, so we should pass the lower limit directly.
1 parent a336cd7 commit 9f5dd4b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roofit/roofitcore/test/TestStatistics/testLikelihoodGradientJob.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ TEST_P(LikelihoodGradientJobErrorTest, FitSimpleLinear)
693693

694694
RooArgSet normSet{x};
695695
ASSERT_FALSE(std::isnan(pdf.getVal(normSet)));
696-
a1.setVal(-9.);
696+
a1.setVal(-5.);
697697
ASSERT_TRUE(std::isnan(pdf.getVal(normSet)));
698698

699699
RooMinimizer minim(*nll);
@@ -708,7 +708,7 @@ TEST_P(LikelihoodGradientJobErrorTest, FitSimpleLinear)
708708
// now with multiprocess
709709
std::unique_ptr<RooAbsReal> nll_mp(pdf.createNLL(*data, RooFit::ModularL(true)));
710710

711-
a1.setVal(-9.);
711+
a1.setVal(-5.);
712712
a1.removeError();
713713
ASSERT_TRUE(std::isnan(pdf.getVal(normSet)));
714714

roofit/roofitcore/test/testNaNPacker.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ TEST(RooNaNPacker, FitSimpleLinear)
155155

156156
RooArgSet normSet{x};
157157
ASSERT_FALSE(std::isnan(pdf.getVal(normSet)));
158-
a1.setVal(-9.);
158+
a1.setVal(-5.);
159159
ASSERT_TRUE(std::isnan(pdf.getVal(normSet)));
160160

161161
RooMinimizer minim(*nll);

0 commit comments

Comments
 (0)