|
[Rivet-svn] r3938 - trunk/testblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Sep 25 10:25:04 BST 2012
Author: dgrell Date: Tue Sep 25 10:25:04 2012 New Revision: 3938 Log: NaN test improved Modified: trunk/test/testNaN.cc Modified: trunk/test/testNaN.cc ============================================================================== --- trunk/test/testNaN.cc Mon Sep 24 16:09:42 2012 (r3937) +++ trunk/test/testNaN.cc Tue Sep 25 10:25:04 2012 (r3938) @@ -16,8 +16,25 @@ void analyze(const Rivet::Event & e) { _h_test->fill(90.,1.); - _h_test->fill(1./0.,1.); - _h_test->fill(sqrt(-1.),1.); + + try { + _h_test->fill(1./0.,1.); + } + catch (YODA::RangeError e) { + cerr << e.what() << '\n'; + if ( string(e.what()) != string("X is Inf") ) + throw; + } + + try { + _h_test->fill(sqrt(-1.),1.); + } + catch (YODA::RangeError e) { + cerr << e.what() << '\n'; + if ( string(e.what()) != string("X is NaN") ) + throw; + } + _h_test->fill(30.,1.); _h_test->fill(130.,1.); }
More information about the Rivet-svn mailing list |