|
[Rivet-svn] r2092 - trunk/src/Testblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Nov 25 12:20:41 GMT 2009
Author: buckley Date: Wed Nov 25 12:20:41 2009 New Revision: 2092 Log: Adding missing testCmp.cc Added: trunk/src/Test/testCmp.cc Added: trunk/src/Test/testCmp.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Test/testCmp.cc Wed Nov 25 12:20:41 2009 (r2092) @@ -0,0 +1,26 @@ +#include <iostream> +#include <limits> + +#include "Rivet/Cmp.hh" + +using namespace std; + +int main() { + using namespace Rivet; + + CmpState cs = UNDEFINED; + + cs = cmp(0.5, 0.6); + cout << "cmp(0.5, 0.6) = " << cs << endl; + assert(cs == ORDERED); + + cs = cmp(0.5, 0.5); + cout << "cmp(0.5, 0.5) = " << cs << endl; + assert(cs == EQUIVALENT); + + cs = cmp(0.6, 0.5); + cout << "cmp(0.6, 0.5) = " << cs << endl; + assert(cs == UNORDERED); + + return EXIT_SUCCESS; +}
More information about the Rivet-svn mailing list |