Functions

mitkStepperTest.cpp File Reference

#include "mitkStepper.h"
#include "mitkTestingMacros.h"

Go to the source code of this file.

Functions

int mitkStepperTest (int, char *[])

Function Documentation

int mitkStepperTest ( int  ,
char *  [] 
)

Definition at line 22 of file mitkStepperTest.cpp.

References MITK_TEST_BEGIN, MITK_TEST_CONDITION_REQUIRED, MITK_TEST_END, and mitk::Stepper::New().

{
  MITK_TEST_BEGIN(StepperTest)

  mitk::Stepper::Pointer stepperA;
  stepperA = mitk::Stepper::New();
  MITK_TEST_CONDITION_REQUIRED(stepperA.IsNotNull(),"Stepper instantiation.")

  // number of steps defaults to zero, SetPos should have no effect, GetPos should return zero
  stepperA->SetPos(10);
  MITK_TEST_CONDITION_REQUIRED(stepperA->GetPos() == 0,"Pos remains zero if m_Steps is zero.")

  mitk::Stepper::Pointer stepperB = mitk::Stepper::New();
  stepperA->SetSteps(4);
  //stepperA->PingPongOn();
  stepperB->SetSteps(6);
  // stepperB->PingPongOn();
  /* for (int i=0 ; i<10; i++) {
    std::cout << i << ": A: " << stepperA->GetPos() << " B:" << stepperB->GetPos() << std::endl; 
    stepperA->Next();
    stepperB->Next();
  }*/
  
  MITK_TEST_END()
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines