00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 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 00019 #include "mitkStepper.h" 00020 #include "mitkTestingMacros.h" 00021 00022 int mitkStepperTest(int /*argc*/, char* /*argv*/[]) 00023 { 00024 MITK_TEST_BEGIN(StepperTest) 00025 00026 mitk::Stepper::Pointer stepperA; 00027 stepperA = mitk::Stepper::New(); 00028 MITK_TEST_CONDITION_REQUIRED(stepperA.IsNotNull(),"Stepper instantiation.") 00029 00030 // number of steps defaults to zero, SetPos should have no effect, GetPos should return zero 00031 stepperA->SetPos(10); 00032 MITK_TEST_CONDITION_REQUIRED(stepperA->GetPos() == 0,"Pos remains zero if m_Steps is zero.") 00033 00034 mitk::Stepper::Pointer stepperB = mitk::Stepper::New(); 00035 stepperA->SetSteps(4); 00036 //stepperA->PingPongOn(); 00037 stepperB->SetSteps(6); 00038 // stepperB->PingPongOn(); 00039 /* for (int i=0 ; i<10; i++) { 00040 std::cout << i << ": A: " << stepperA->GetPos() << " B:" << stepperB->GetPos() << std::endl; 00041 stepperA->Next(); 00042 stepperB->Next(); 00043 }*/ 00044 00045 MITK_TEST_END() 00046 }