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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Aug 24 12:11:46 BST 2011


Author: mkawalec
Date: Wed Aug 24 12:11:46 2011
New Revision: 345

Log:
Added bin removal tests to Histo1D

Modified:
   trunk/tests/Histo1D/Modify.cc

Modified: trunk/tests/Histo1D/Modify.cc
==============================================================================
--- trunk/tests/Histo1D/Modify.cc	Wed Aug 24 12:03:23 2011	(r344)
+++ trunk/tests/Histo1D/Modify.cc	Wed Aug 24 12:11:46 2011	(r345)
@@ -25,6 +25,26 @@
   }
   cout << "PASS" << endl;
 
+  
+  
+  cout << "Checking if bin removal works:           ";
+  h.eraseBin(0);
+  cout << "PASS" << endl;
+  
+  cout << "Was the bin number updated properly?     ";
+  if(h.numBins() != 89) {
+    cout << "FAIL" << endl;
+    return -1;
+  }
+  cout << "PASS" << endl;
+
+  cout << "Was the right bin removed?               ";
+  if(fuzzyEquals(h.bin(0).xMin(), 0) && fuzzyEquals(h.bin(0).xMax(), 11)){
+    cout << "FAIL" << endl;
+    return -1;
+  }
+  cout << "PASS" << endl;
+
 
   return EXIT_SUCCESS;
 }


More information about the yoda-svn mailing list