78 CPPUNIT_TEST_SUITE(mitkSceneIOTest2Suite);
81 CPPUNIT_TEST_SUITE_END();
86 void Test_SceneIOInterfaces() { CPPUNIT_ASSERT_MESSAGE(
"Not urgent",
true); }
87 void Test_ReconstructionOfScenes()
93 for (
auto scenario : scenarios)
95 MITK_TEST_OUTPUT(<<
"\n===== Test_ReconstructionOfScenes, scenario '" << scenario.key <<
"' =====");
100 CPPUNIT_ASSERT_MESSAGE(
101 std::string(
"Save test scenario '") + scenario.key +
"' to '" + archiveFilename +
"'",
102 scenario.serializable == writer->SaveScene(originalStorage->GetAll(), originalStorage, archiveFilename));
104 if (scenario.serializable)
108 CPPUNIT_ASSERT_NO_THROW(restoredStorage = reader->LoadScene(archiveFilename));
109 CPPUNIT_ASSERT_MESSAGE(
110 std::string(
"Comparing restored test scenario '") + scenario.key +
"'",
122 scenario.comparisonPrecision)
132 CppUnit::TextUi::TestRunner runner;
133 runner.addTest(mitkSceneIOTest2Suite::suite());
134 return runner.run() ? 0 : 1;
bool CompareVerbose()
Shorthand for Compare(true).
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
ScenarioList GetAllScenarios() const
Returns all registered scenarios.
#define MITK_TEST_OUTPUT(x)
Output some text.
int mitkSceneIOTest2(int, char *[])
Test fixture for parameterized tests.
static std::string CreateTemporaryDirectory(const std::string &templateName="XXXXXX", std::string path=std::string())
static std::string CreateTemporaryFile(std::ofstream &tmpStream, const std::string &templateName="XXXXXX", std::string path=std::string())
Provides DataStorages that serve as test scenarios.
std::vector< Scenario > ScenarioList
List of Scenarios.