diff --git a/bindings/pyroot/cppyy/cppyy/test/test_operators.py b/bindings/pyroot/cppyy/cppyy/test/test_operators.py index db8f0c2854cc7..ca6cc3e58de73 100644 --- a/bindings/pyroot/cppyy/cppyy/test/test_operators.py +++ b/bindings/pyroot/cppyy/cppyy/test/test_operators.py @@ -338,7 +338,7 @@ def test14_single_argument_call(self): b = ns.Bar() assert b[42] == 42 - @mark.xfail(condition=IS_MAC, reason="Fails on OSX") + @mark.xfail(reason='Fails on macOS and on Linux with gcc 16 because cppyy picks the wrong "operator-" overload.') def test15_class_and_global_mix(self): """Iterator methods have both class and global overloads""" @@ -349,6 +349,10 @@ def test15_class_and_global_mix(self): x = std.vector[int]([1,2,3]) assert (x.end() - 1).__deref__() == 3 + # Next line fails with "TypeError: int/long conversion expects an integer object". + # The subtraction should pick the (iterator, iterator) -> int overload, + # but it somehow chooses the (iterator, iterator) -> iterator overload + # with compiling ROOT with gcc 16. TODO: fix this. assert std.max_element(x.begin(), x.end())-x.begin() == 2 assert (x.end() - 3).__deref__() == 1 diff --git a/roofit/roofitcore/test/testRooFuncWrapper.cxx b/roofit/roofitcore/test/testRooFuncWrapper.cxx index 2ebdf95333ffb..189e8f2e26657 100644 --- a/roofit/roofitcore/test/testRooFuncWrapper.cxx +++ b/roofit/roofitcore/test/testRooFuncWrapper.cxx @@ -34,12 +34,12 @@ #include #include +#include #include +#include #include -#include #include -#include #include "gtest_wrapper.h" @@ -66,13 +66,13 @@ double getNumDerivative(const RooAbsReal &pdf, RooRealVar &var, const RooArgSet void randomizeParameters(const RooArgSet ¶meters) { + TRandom3 rng(1337); + double lowerBound = -0.1; double upperBound = 0.1; - std::uniform_real_distribution unif(lowerBound, upperBound); - std::default_random_engine re; for (auto *param : parameters) { - double mul = unif(re); + double mul = rng.Uniform(lowerBound, upperBound); auto par = dynamic_cast(param); if (!par)