23 const char *NEW_ORGAN =
24 "Der Knopf von der Eingangstuer von der Siebenschlaeferbehausung ist aus Messing damit es nicht so schnell rostet";
27 unsigned int numberFailed(0);
29 std::cout <<
"Instantiation" << std::endl;
33 if (prop1.IsNotNull())
35 std::cout <<
" (II) Instantiation works." << std::endl;
40 std::cout << numberFailed <<
" test failed, and it's the ugliest one!" << std::endl;
45 if (prop1.IsNotNull())
47 std::cout <<
" (II) Instantiation still works." << std::endl;
52 std::cout << numberFailed <<
" test failed, and it's the ugliest one!" << std::endl;
57 prop1->AddEnum(NEW_ORGAN, prop1->Size());
59 if (!prop1->IsValidEnumerationValue(NEW_ORGAN))
62 std::cout <<
" (EE) New organ is not a valid enumeration type after adding calling AddEnum()." << std::endl;
66 std::cout <<
" (II) AddEnum() works." << std::endl;
69 if (!prop2->IsValidEnumerationValue(NEW_ORGAN))
72 std::cout <<
" (EE) New organ type did not propagate to a second instance of OrganTypeProperty." << std::endl;
75 std::cout <<
"Object destruction" << std::endl;
79 std::cout <<
" (II) Freeing works for first property." << std::endl;
82 std::cout <<
" (II) Freeing works for both properties." << std::endl;
86 std::cout << numberFailed <<
" tests failed." << std::endl;
91 std::cout <<
"PASSED all tests." << std::endl;
int mitkOrganTypePropertyTest(int, char *[])
ctest entry point