summaryrefslogtreecommitdiff
path: root/utils/mfcr_test.cc
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-31 13:57:24 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-31 13:57:24 +0200
commitf1ba05780db1705493d9afb562332498b93d26f1 (patch)
treefb429a657ba97f33e8140742de9bc74d9fc88e75 /utils/mfcr_test.cc
parentaadabfdf37dfd451485277cb77fad02f77b361c6 (diff)
parent317d650f6cb1e24ac6f3be6f7bf9d4246a59e0e5 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'utils/mfcr_test.cc')
-rw-r--r--utils/mfcr_test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/mfcr_test.cc b/utils/mfcr_test.cc
index cc886335..29a1a2ce 100644
--- a/utils/mfcr_test.cc
+++ b/utils/mfcr_test.cc
@@ -4,11 +4,17 @@
#include <cassert>
#include <cmath>
+#define BOOST_TEST_MODULE MFCRTest
+#include <boost/test/unit_test.hpp>
+#include <boost/test/floating_point_comparison.hpp>
+
#include "sampler.h"
using namespace std;
-void test_exch(MT19937* rng) {
+BOOST_AUTO_TEST_CASE(Exchangability) {
+ MT19937 r;
+ MT19937* rng = &r;
MFCR<2, int> crp(0.5, 3.0);
vector<double> lambdas(2);
vector<double> p0s(2);
@@ -64,9 +70,3 @@ void test_exch(MT19937* rng) {
assert(error2 < 0.05);
};
-int main(int argc, char** argv) {
- MT19937 rng;
- test_exch(&rng);
- return 0;
-}
-