26 map.
Add(
"test", list);
28 map.
Get(
"test").front() == 0,
29 "Testing if Add successfully adds a new list.");
31 map.
Add(
"test", list);
33 map.
Get(
"test")[0] == 0,
34 "Testing if Add doesn't add to an existing list.");
40 map.
Add(
"abc", list2);
42 map.
Get(
"test").front() == 0 &&
43 map.
Get(
"abc").size() == 1 &&
44 map.
Get(
"abc").front() == 3,
45 "Testing if Get returns the correct list.");
66 map.
Add(
"abc", list2);
67 map.
Add(
"def", list3);
70 map.
Get(
"abc")[1] == 2 &&
71 map.
Get(
"abc")[2] == 3 &&
72 map.
Get(
"abc")[3] == 4 &&
73 map.
Get(
"abc")[4] == 5 &&
74 map.
Get(
"def")[0] == 5 &&
75 map.
Get(
"def")[1] == 4 &&
76 map.
Get(
"def")[2] == 3 &&
77 map.
Get(
"def")[3] == 2 &&
78 map.
Get(
"def")[4] == 1,
79 "Testing if Sort successfully sorts by the first key");
83 map.
Get(
"abc")[1] == 4 &&
84 map.
Get(
"abc")[2] == 3 &&
85 map.
Get(
"abc")[3] == 2 &&
86 map.
Get(
"abc")[4] == 1 &&
87 map.
Get(
"def")[0] == 1 &&
88 map.
Get(
"def")[1] == 2 &&
89 map.
Get(
"def")[2] == 3 &&
90 map.
Get(
"def")[3] == 4 &&
91 map.
Get(
"def")[4] == 5,
92 "Testing if Sort successfully sorts by the given key");
97 map.
Add(
"ghi", list4);
98 map.
Add(
"abc", list2);
99 map.
Add(
"def", list3);
103 map.
Get(
"abc")[0] == 1 &&
104 map.
Get(
"abc")[1] == 2 &&
105 map.
Get(
"abc")[2] == 3 &&
106 map.
Get(
"abc")[3] == 4 &&
107 map.
Get(
"abc")[4] == 5 &&
108 map.
Get(
"def")[0] == 5 &&
109 map.
Get(
"def")[1] == 4 &&
110 map.
Get(
"def")[2] == 3 &&
111 map.
Get(
"def")[3] == 2 &&
112 map.
Get(
"def")[4] == 1,
113 "Testing if Sort successfully sorts if the map includes " <<
ModelBase::StaticParameterValuesType ValueType
Type of the map value.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
int mitkModelFitStaticParameterMapTest(int, char *[])
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
#define MITK_TEST_FOR_EXCEPTION(EXCEPTIONCLASS, STATEMENT)
Simplified version of MITK_TEST_FOR_EXCEPTION_BEGIN / END for a single statement. ...
void Add(const std::string &name, const ValueType &newList)
Adds the given value list under the given variable name if the name doesn't exist already...
void Clear()
Resets the map, so it's empty.
const ValueType & Get(const std::string &name) const
Returns the values of the given variable name.
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map(const InputImageType *input, const RegistrationType *registration, bool throwOnOutOfInputAreaError=false, const double &paddingValue=0, const ResultImageGeometryType *resultGeometry=nullptr, bool throwOnMappingError=true, const double &errorValue=0, mitk::ImageMappingInterpolator::Type interpolatorType=mitk::ImageMappingInterpolator::Linear)
Class-specific exception for modelfits.
void Sort(const std::string &name="")
Sorts the values of the given variable name in ascending order. The values of all other variables wil...