From d6043c3e2355a77b61a797b18cc6ab1335b7e652 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Sat, 22 Oct 2022 02:03:47 +0200 Subject: [PATCH] [RF] Force BatchMode `off` in test that covers legacy test statistics --- roofit/roofitcore/test/testTestStatistics.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roofit/roofitcore/test/testTestStatistics.cxx b/roofit/roofitcore/test/testTestStatistics.cxx index cee0b9855908e..70541912b963c 100644 --- a/roofit/roofitcore/test/testTestStatistics.cxx +++ b/roofit/roofitcore/test/testTestStatistics.cxx @@ -308,8 +308,10 @@ TEST(RooNLLVar, CopyRangedNLL) std::unique_ptr ds{model.generate(x, 20)}; - std::unique_ptr nll{static_cast(model.createNLL(*ds))}; - std::unique_ptr nllrange{static_cast(model.createNLL(*ds, RooFit::Range("fitrange")))}; + // This bug is related to the implementation details of the old test statistics, so BatchMode is forced to be off + using namespace RooFit; + std::unique_ptr nll{static_cast(model.createNLL(*ds, BatchMode("off")))}; + std::unique_ptr nllrange{static_cast(model.createNLL(*ds, Range("fitrange"), BatchMode("off")))}; auto nllClone = std::make_unique(*nll); auto nllrangeClone = std::make_unique(*nllrange);