Add back forgotten rng testsuite (attibution: Peter Barnes noticed it)
authormmiozzo
Thu, 20 Mar 2014 23:37:16 +0100
changeset 10673 44d19e88713f
parent 10672 53870483ef76
child 10675 67ec151083bd
Add back forgotten rng testsuite (attibution: Peter Barnes noticed it)
src/core/test/random-variable-stream-test-suite.cc
src/core/wscript
--- a/src/core/test/random-variable-stream-test-suite.cc	Tue Mar 18 13:17:12 2014 +0100
+++ b/src/core/test/random-variable-stream-test-suite.cc	Thu Mar 20 23:37:16 2014 +0100
@@ -288,7 +288,7 @@
 {
 public:
   static const uint32_t N_MEASUREMENTS = 1000000;
-  static const double TOLERANCE = 1e-8;
+  static const double TOLERANCE;
 
   RandomVariableStreamConstantTestCase ();
   virtual ~RandomVariableStreamConstantTestCase ();
@@ -297,6 +297,8 @@
   virtual void DoRun (void);
 };
 
+const double RandomVariableStreamConstantTestCase::TOLERANCE = 1e-8;
+
 RandomVariableStreamConstantTestCase::RandomVariableStreamConstantTestCase ()
   : TestCase ("Constant Random Variable Stream Generator")
 {
@@ -336,7 +338,7 @@
 class RandomVariableStreamSequentialTestCase : public TestCase
 {
 public:
-  static const double TOLERANCE = 1e-8;
+  static const double TOLERANCE;
 
   RandomVariableStreamSequentialTestCase ();
   virtual ~RandomVariableStreamSequentialTestCase ();
@@ -345,6 +347,8 @@
   virtual void DoRun (void);
 };
 
+const double RandomVariableStreamSequentialTestCase::TOLERANCE = 1e-8;
+
 RandomVariableStreamSequentialTestCase::RandomVariableStreamSequentialTestCase ()
   : TestCase ("Sequential Random Variable Stream Generator")
 {
@@ -2590,7 +2594,7 @@
 class RandomVariableStreamDeterministicTestCase : public TestCase
 {
 public:
-  static const double TOLERANCE = 1e-8;
+  static const double TOLERANCE;
 
   RandomVariableStreamDeterministicTestCase ();
   virtual ~RandomVariableStreamDeterministicTestCase ();
@@ -2599,6 +2603,8 @@
   virtual void DoRun (void);
 };
 
+const double RandomVariableStreamDeterministicTestCase::TOLERANCE = 1e-8;
+
 RandomVariableStreamDeterministicTestCase::RandomVariableStreamDeterministicTestCase ()
   : TestCase ("Deterministic Random Variable Stream Generator")
 {
--- a/src/core/wscript	Tue Mar 18 13:17:12 2014 +0100
+++ b/src/core/wscript	Thu Mar 20 23:37:16 2014 +0100
@@ -356,7 +356,10 @@
     if env['ENABLE_GSL']:
         core.use.extend(['GSL', 'GSLCBLAS', 'M'])
         core_test.use.extend(['GSL', 'GSLCBLAS', 'M'])
-        core_test.source.extend(['test/rng-test-suite.cc'])
+        core_test.source.extend([
+                'test/rng-test-suite.cc',
+                'test/random-variable-stream-test-suite.cc'
+                ])
 
     if (bld.env['ENABLE_EXAMPLES']):
         bld.recurse('examples')