Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

Testing.h

Go to the documentation of this file.
00001 #ifndef TESTING_H
00002 #define TESTING_H
00003 
00004 #include "SundanceDefs.h"
00005 #include <string>
00006 
00007 namespace Sundance
00008 {
00009   using namespace TSF;
00010   using std::string;
00011 
00012   /**
00013    * \ingroup General
00014    * Utilities for regression tests
00015    */
00016 
00017   class Testing
00018     {
00019     public:
00020       /** do a pass-fail check based on a comparison of error to a tolerance */
00021       static void passFailCheck(const string& name, double error, double tol);
00022 
00023       /** do a pass-fail check based on bool result */
00024       static void passFailCheck(const string& name, bool pass);
00025 
00026       /** report an inability to test due to uninstalled 3rd party libraries */
00027       static void missingPackage(const string& testName,
00028                                  const string& packageName);
00029 
00030       /** report a failure due to a crash */
00031       static void crash(const string& name);
00032 
00033       /** generate a time stamp */
00034       static void timeStamp(const string& filename, const string& date,
00035                             const string& time);
00036 
00037       /** do a pass-fail check on a unit test */
00038       static void unitTest(const string& testName, bool result);
00039 
00040       /** check for missing file(s) on which this executable depends */
00041       static void missingFile(const string& testName,
00042                               const string& filename);
00043 
00044     };
00045 
00046 
00047 
00048 }
00049 
00050 #endif

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by