Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkStepperTest.cpp
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#include "
mitkStepper.h
"
14
#include "
mitkTestingMacros.h
"
15
16
int
mitkStepperTest
(
int
/*argc*/
,
char
*
/*argv*/
[])
17
{
18
MITK_TEST_BEGIN
(StepperTest)
19
20
mitk::Stepper::Pointer
stepperA;
21
stepperA =
mitk::Stepper::New
();
22
MITK_TEST_CONDITION_REQUIRED
(stepperA.IsNotNull(),
"Stepper instantiation."
)
23
24
// number of steps defaults to zero, SetPos should have no effect, GetPos should return zero
25
stepperA->SetPos(10);
26
MITK_TEST_CONDITION_REQUIRED
(stepperA->GetPos() == 0,
"Pos remains zero if m_Steps is zero."
)
27
28
mitk::Stepper::Pointer
stepperB =
mitk::Stepper::New
();
29
stepperA->SetSteps(4);
30
// stepperA->PingPongOn();
31
stepperB->SetSteps(6);
32
// stepperB->PingPongOn();
33
/* for (int i=0 ; i<10; i++) {
34
std::cout << i << ": A: " << stepperA->GetPos() << " B:" << stepperB->GetPos() << std::endl;
35
stepperA->Next();
36
stepperB->Next();
37
}*/
38
39
MITK_TEST_END
()
40
}
mitkStepperTest
int mitkStepperTest(int, char *[])
Definition:
mitkStepperTest.cpp:16
MITK_TEST_CONDITION_REQUIRED
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
Definition:
mitkTestingMacros.h:132
mitkTestingMacros.h
MITK_TEST_BEGIN
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
mitk::Stepper::New
static Pointer New()
mitkStepper.h
itk::SmartPointer< Self >
MITK_TEST_END
and MITK_TEST_END()
Source
Modules
Core
test
mitkStepperTest.cpp
Generated on Thu Mar 12 2020 10:24:04 for Medical Imaging Interaction Toolkit by
1.8.13