Browse Source
Prevent problems with different random values on older Boost versions
tempestpy_adaptions
Matthias Volk
4 years ago
No known key found for this signature in database
GPG Key ID: 83A57678F739FCD3
2 changed files with
14 additions and
2 deletions
-
src/test/storm-dft/simulator/DftTraceGeneratorTest.cpp
-
src/test/storm-dft/simulator/SamplingTest.cpp
|
|
@ -175,12 +175,18 @@ namespace { |
|
|
|
|
|
|
|
// First random step
|
|
|
|
double timebound = simulator.randomStep(); |
|
|
|
#if BOOST_VERSION > 106400
|
|
|
|
// Older Boost versions yield different value
|
|
|
|
EXPECT_FLOAT_EQ(timebound, 0.522079); |
|
|
|
#endif
|
|
|
|
state = simulator.getCurrentState(); |
|
|
|
EXPECT_FALSE(state->hasFailed(dft->getTopLevelIndex())); |
|
|
|
|
|
|
|
timebound = simulator.randomStep(); |
|
|
|
#if BOOST_VERSION > 106400
|
|
|
|
// Older Boost versions yield different value
|
|
|
|
EXPECT_FLOAT_EQ(timebound, 0.9497214); |
|
|
|
#endif
|
|
|
|
state = simulator.getCurrentState(); |
|
|
|
EXPECT_TRUE(state->hasFailed(dft->getTopLevelIndex())); |
|
|
|
} |
|
|
|
|
|
@ -6,6 +6,12 @@ |
|
|
|
namespace { |
|
|
|
|
|
|
|
TEST(SamplingTest, SampleExponential) { |
|
|
|
#if BOOST_VERSION < 106400
|
|
|
|
// Boost changed implementation of exponential distribution
|
|
|
|
// -> different values are returned
|
|
|
|
GTEST_SKIP(); |
|
|
|
return; |
|
|
|
#endif
|
|
|
|
boost::mt19937 gen(5u); |
|
|
|
storm::utility::ExponentialDistributionGenerator dist(5); |
|
|
|
|
|
|
|