Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SamplingTest.cpp
Go to the documentation of this file.
1#include "storm-config.h"
2#include "test/storm_gtest.h"
3
5
6namespace {
7
8TEST(SamplingTest, SampleExponential) {
9#if BOOST_VERSION < 106400
10 // Boost changed implementation of exponential distribution
11 // -> different values are returned
12 GTEST_SKIP();
13 return;
14#endif
15 boost::mt19937 gen(5u);
17
18 // Ensure that pseudo random numbers are the same on all machines
19 double reference[] = {0.18241937154, 0.0522078772595, 0.0949721368604, 0.246869315378, 0.765000791199,
20 0.0177096648877, 0.225167598601, 0.23538530391, 1.01605360643, 0.138846355094};
21 for (int i = 0; i < 10; ++i) {
22 EXPECT_NEAR(dist.random(gen), reference[i], 1e-10);
23 }
24}
25
26} // namespace
TEST(OrderTest, Simple)
Definition OrderTest.cpp:8