powerflow/test.cpp

00001 
00027 #include <stdlib.h>
00028 #include <stdio.h>
00029 #include <errno.h>
00030 #include <math.h>
00031 #include "gridlabd.h"
00032 
00033 #ifndef _NO_CPPUNIT
00034 // Include the local copy of test.h
00035 #include "./test.h"
00036 
00037 
00048 EXPORT int module_test(TEST_CALLBACKS *callbacks,int argc, char* argv[]){
00049     // It is likely that no modifications will be necessary to this function.
00050     // Tests should be implemented in the header file above, and created as
00051     // a CPPUnit test suite.
00052     printf("");
00053 
00054     local_callbacks = callbacks;
00055     CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
00056 
00057     // Adds the test to the list of test to run
00058     CppUnit::TextUi::TestRunner runner;
00059     runner.addTest( suite );
00060 
00061     // Change the default outputter to a compiler error format outputter
00062     runner.setOutputter( new CppUnit::TextOutputter( &runner.result(),std::cerr ) );
00063     // Run the tests.
00064     bool wasSucessful = runner.run();
00065     if(wasSucessful == false)
00066         return 0;
00067     return 1;
00068 }
00069 
00070 #endif

GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy