Commit c9d71276 authored by Mathieu Deltorre's avatar Mathieu Deltorre
Browse files

Ajout test sur operator+ et operator- pour iterator

parent 5ec06330
......@@ -99,6 +99,19 @@ int otbList(int argc, char * argv[])
++iter;
}
// Testing operator+
iter = imageList->Begin();
index=0;
otbControlConditionTestMacro(imageList->GetNthElement(0) != iter.Get(),
"Iterator != GetNthElement(0)");
otbControlConditionTestMacro(imageList->GetNthElement(1) != (iter+1).Get(),
"Iterator+1 != GetNthElement(1)");
++iter;
otbControlConditionTestMacro(imageList->GetNthElement(1) != iter.Get(),
"Iterator != GetNthElement(1)");
otbControlConditionTestMacro(imageList->GetNthElement(0) != (iter-1).Get(),
"Iterator-1 != GetNthElement(0)");
// Testing const iterator
ImageListType::ConstIterator constIter = imageList->Begin();
index = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment