summaryrefslogtreecommitdiff
path: root/utils/mfcr_test.cc
diff options
context:
space:
mode:
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;
-}
-