7 #pragma warning(disable : 4996) 29 #define CM_CAST(TYPE, EXPR) static_cast<TYPE>(EXPR) 31 #define CM_CAST(TYPE, EXPR) (TYPE)(EXPR) 45 "mitkSlicedVolumeGeneratorTest",
49 "mitkPhotoacousticTissueGeneratorTest",
53 "mitkPhotoacousticVectorTest",
57 "mitkPhotoacoustic3dVolumeTest",
61 "mitkPhotoacousticVesselTreeTest",
69 "mitkPhotoacousticComposedVolumeTest",
73 "mitkPhotoacousticNoiseGeneratorTest",
77 "mitkSimulationBatchGeneratorTest",
81 "mitkPropertyCalculatorTest",
85 "mitkPhotoacousticVesselMeanderStrategyTest",
89 "mitkPhotoacousticVesselTest",
103 char *new_string, *p;
106 stringSize =
CM_CAST(
size_t, strlen(
string) + 1);
107 new_string =
CM_CAST(
char*, malloc(
sizeof(
char) * stringSize));
109 if (new_string == NULL) {
112 strcpy(new_string,
string);
113 for (p = new_string; *p != 0; ++p) {
114 *p =
CM_CAST(
char, tolower(*p));
121 int i, testNum = 0, partial_match;
131 printf(
"Available tests:\n");
135 printf(
"To run a test, enter the test number: ");
137 if (scanf(
"%d", &testNum) != 1) {
138 printf(
"Couldn't parse that input as a number\n");
141 if (testNum >= NumTests) {
142 printf(
"%3d is an invalid test number.\n", testNum);
152 if (testToRun == -1 && ac > 1) {
153 partial_match = (strcmp(av[1],
"-R") == 0) ? 1 : 0;
155 if (partial_match != 0 && ac < 3) {
156 printf(
"-R needs an additional parameter.\n");
159 if (testToRun == -1) {
162 for (i = 0; i <
NumTests && testToRun == -1; ++i) {
164 if (partial_match != 0 && strstr(test_name, arg) != NULL) {
168 }
else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
176 if (testToRun != -1) {
179 for (
int avIndex = 1; avIndex < ac; ++avIndex)
globalCmdLineArgs.push_back(av[avIndex]);
182 if (testToRun < 0 || testToRun >=
NumTests) {
183 printf(
"testToRun was modified by TestDriver code to an invalid value: " 194 printf(
"Available tests:\n");
198 printf(
"Failed: %s is an invalid test name.\n", av[1]);
int mitkPhotoacousticTissueGeneratorTest(int, char *[])
static void Register()
registers MITK logging backend at mbilog
int mitkPhotoacousticVesselMeanderStrategyTest(int, char *[])
int mitkPhotoacousticVectorTest(int, char *[])
static const int NumTests
int mitkPhotoacoustic3dVolumeTest(int, char *[])
static functionMapEntry cmakeGeneratedFunctionMapEntries[]
int mitkPropertyCalculatorTest(int, char *[])
int mitkPhotoacousticVesselTreeTest(int, char *[])
int mitkSimulationBatchGeneratorTest(int, char *[])
static char * lowercase(const char *string)
int mitkPhotoacousticNoiseGeneratorTest(int, char *[])
int mitkPhotoacousticVesselTest(int, char *[])
int mitkMcxyzXmlTest(int, char *[])
int(* MainFuncPointer)(int, char *[])
#define CM_CAST(TYPE, EXPR)
int mitkSlicedVolumeGeneratorTest(int, char *[])
int main(int ac, char *av[])
static void Unregister()
Unregisters MITK logging backend at mbilog.
int mitkPhotoacousticComposedVolumeTest(int, char *[])
std::vector< std::string > globalCmdLineArgs