00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-01-05 17:52:33 +0100 (Mo, 05 Jan 2009) $ 00006 Version: $Revision: 16006 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #include "QmitkIGTExampleView.h" 00019 00020 #ifdef BUILD_TESTING // only if we build a test driver 00021 00022 #include "ui_QmitkIGTExampleViewControls.h" 00023 00024 #include "mitkTestingMacros.h" 00025 //#include "QmitkUserInputSimulation.h" 00026 00027 00031 int QmitkIGTExampleView::TestYourself() 00032 { 00033 MITK_TEST_BEGIN("QmitkIGTExampleView::TestYourself"); 00034 00035 // Write test here. 00036 // click on Buttons with QmitkUserInputSimulation::MouseClick(m_Controls->m_MyButton, Qt::LeftButton); 00037 // simulate key presses with QmitkUserInputSimulation::KeyboardTypeKey(m_Controls->m_MyWidget, Qt::Key_Down); 00038 // check results using MITK_TEST_CONDITION_REQUIRED(myBoolExpression ,"my testcase " << someVariable_that_should_be_mentioned); 00039 // and MITK_TEST_CONDITION(myBoolExpression ,"my testcase " << someVariable_that_should_be_mentioned); 00040 // Write Output to the command line only with MITK_TEST_OUTPUT(<< "Hello"); 00041 // and MITK_TEST_OUTPUT_NO_ENDL(<< "Hello"); 00042 // artificially fail a test with MITK_TEST_FAILED_MSG(<<"failed because!"); 00043 // more information about writing a test can be found here: http://makalu/mbiwiki/TestsErstellen 00044 00045 #ifndef MITK_FAST_TESTING 00046 // execute time consuming tests only in here (execution of time consuming filter pipeline...) 00047 00048 #endif 00049 00050 MITK_TEST_END(); 00051 } 00052 00053 #endif // BUILD_TESTING