[yoda-svn] r342 - trunk/tests/Histo1D

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Aug 24 11:37:54 BST 2011


Author: mkawalec
Date: Wed Aug 24 11:37:54 2011
New Revision: 342

Log:
Added under/over flow checking to Histo1D tests.

Modified:
   trunk/tests/Histo1D/Fill.cc

Modified: trunk/tests/Histo1D/Fill.cc
==============================================================================
--- trunk/tests/Histo1D/Fill.cc	Wed Aug 24 11:30:30 2011	(r341)
+++ trunk/tests/Histo1D/Fill.cc	Wed Aug 24 11:37:54 2011	(r342)
@@ -43,5 +43,25 @@
   }
   cout << "PASS" << endl;
   
+  cout << "Trying to fill the underflow:            ";
+  h.fill(-10,1);
+  cout << "PASS" << endl;
+  cout << "Checking if stats were set correctly:    ";
+  if(!fuzzyEquals(h.underflow().mean(), -10)) {
+    cout << "FAIL" << endl;
+    return -1;
+  }
+  cout << "PASS" << endl;
+
+  cout << "Trying to fill the overflow:             ";
+  h.fill(110,1);
+  cout << "PASS" << endl;
+  cout << "Checking if stats were set correctly:    ";
+  if(!fuzzyEquals(h.overflow().mean(), 110)) {
+    cout << "FAIL" << endl;
+    return -1;
+  }
+  cout << "PASS" << endl;
+
   return EXIT_SUCCESS;
 }


More information about the yoda-svn mailing list