Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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,
6
Division of Medical and Biological Informatics.
7
All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without
10
even the implied warranty of MERCHANTABILITY or FITNESS FOR
11
A PARTICULAR PURPOSE.
12
13
See LICENSE.txt or http://www.mitk.org for details.
14
15
===================================================================*/
16
17
#include "
mitkStepper.h
"
18
#include "
mitkTestingMacros.h
"
19
20
int
mitkStepperTest
(
int
/*argc*/
,
char
*
/*argv*/
[])
21
{
22
MITK_TEST_BEGIN
(StepperTest)
23
24
mitk::Stepper::Pointer
stepperA;
25
stepperA =
mitk::Stepper::New
();
26
MITK_TEST_CONDITION_REQUIRED
(stepperA.IsNotNull(),
"Stepper instantiation."
)
27
28
// number of steps defaults to zero, SetPos should have no effect, GetPos should return zero
29
stepperA->SetPos(10);
30
MITK_TEST_CONDITION_REQUIRED
(stepperA->GetPos() == 0,
"Pos remains zero if m_Steps is zero."
)
31
32
mitk::Stepper::Pointer
stepperB =
mitk::Stepper::New
();
33
stepperA->SetSteps(4);
34
// stepperA->PingPongOn();
35
stepperB->SetSteps(6);
36
// stepperB->PingPongOn();
37
/* for (int i=0 ; i<10; i++) {
38
std::cout << i << ": A: " << stepperA->GetPos() << " B:" << stepperB->GetPos() << std::endl;
39
stepperA->Next();
40
stepperB->Next();
41
}*/
42
43
MITK_TEST_END
()
44
}
mitkStepperTest
int mitkStepperTest(int, char *[])
Definition:
mitkStepperTest.cpp:20
MITK_TEST_CONDITION_REQUIRED
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
Definition:
mitkTestingMacros.h:135
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()
git
MITK
Modules
Core
test
mitkStepperTest.cpp
Generated on Fri Feb 3 2017 20:52:08 for Medical Imaging Interaction Toolkit by
1.8.9.1