[cluttermm] Corrected error in test file; incorrect value added.



commit 9d8d2c613b05fcb6d87f67517ac9f8d309bc7041
Author: Ian Martin <martin_id vodafone co nz>
Date:   Fri Mar 14 22:23:19 2014 +1300

    Corrected error in test file; incorrect value added.

 tests/test-interval-creation.cc |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tests/test-interval-creation.cc b/tests/test-interval-creation.cc
index cf0ee53..0ea62b4 100644
--- a/tests/test-interval-creation.cc
+++ b/tests/test-interval-creation.cc
@@ -62,11 +62,13 @@ int main(int argc, char** argv)
     errorval += 100;
   }
 
-  interval2->compute_value( 0.7, compute2 );
-  double compval = dub_a + ( ( dub_b - dub_a ) / 2 );
+  double compute_fraction = 0.7;
+
+  interval2->compute_value( compute_fraction, compute2 );
+  double compval =  dub_a + ( ( dub_b - dub_a ) * compute_fraction );
   if( compute2.get() != compval )
   {
-    std::cerr << "Error computing a value with factor = 0.7: " << compute2.get() << "; correct value is "<< 
compval << std::endl;
+    std::cout << "Error computing a value with factor = " << compute_fraction << ": " << compute2.get() << 
"; correct value is "<< compval << std::endl;
     errorval += 1000;
   }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]