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
commit6f6601111710aa67eee5169e5b7d89102cc33bb8 (patch)
tree0872544abd6bc76162f3f80eb3920999afbf2c34 /utils/mfcr_test.cc
parent8cee8b565a9c56a7732365e9563f52ff3c4ff7fd (diff)
parent090a64e73f94a6a35e5364a9d416dcf75c0a2938 (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;
-}
-