#ifndef test_ModelObjects_h__ #define test_ModelObjects_h__ //Disable posix warning on getch() #pragma warning(disable : 4800) #include "Tests/tests_macros.h" #include "DConsole.h" #include "DStringUtils.h" #include "Providers/DMySQLDataProvider.h" #include "Model/DDirectory.h" #include "DWorkUtils.h" #include "Model/DAssignment.h" #include "Model/DRunRange.h" #include "Model/DVariation.h" #include "Model/DConstantsTypeColumn.h" #include "Model/DConstantsTypeTable.h" using namespace std; using namespace ccdb; bool test_ModelObjects() { TESTS_INIT(" --- T E S T S M o d e l O b j e c t s --- ") //Connection gConsole.WriteLine(DConsole::cBrightWhite, "[ Creation ]"); gConsole.WriteLine("Look for crashes"); DStoredObject *ptr; TITLE("DAssignment ") ptr = new DAssignment(NULL, NULL); TEST(ptr!=NULL); TITLE("DRunRange ") ptr = new DRunRange(NULL, NULL); TEST(ptr!=NULL); //TITLE("DEventRange ") // ptr = new DEventRange(NULL, false); //TEST(ptr); TITLE("DVariation ") ptr = new DVariation(NULL, NULL); TEST(ptr); TITLE("DDirectory ") ptr = new DDirectory(NULL, NULL); TEST(ptr); TITLE("DConstantsTypeTable ") ptr = new DConstantsTypeTable(NULL, NULL); TEST(ptr); TITLE("DConstantsTypeColumn ") ptr = new DConstantsTypeColumn(NULL, NULL); TEST(ptr); //TODO more complicated tests with a - benchmark, b - check for memory management return true; }; #endif