@@ -180,7 +180,11 @@ TEST_F(PasteFixture, ConstantPaste3_2)
180180 filter->SetDestinationImage (inputImage);
181181
182182 filter->SetDestinationIndex ({ { 11 , 13 , 17 } });
183- filter->SetDestinationSkipAxes (SkipType{ { { true , false , false } } });
183+
184+ SkipType destinationSkipAxes{ { { true , false , false } } };
185+ filter->SetDestinationSkipAxes (destinationSkipAxes);
186+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
187+
184188 filter->SetSourceRegion (Utils::SourceSizeType{ { 5 , 6 } });
185189 filter->UpdateLargestPossibleRegion ();
186190 EXPECT_EQ (" dfdbfe702adeccece580c5e0795d8f0a" , MD5Hash (filter->GetOutput ()));
@@ -189,36 +193,56 @@ TEST_F(PasteFixture, ConstantPaste3_2)
189193
190194
191195 filter->SetDestinationIndex ({ { 11 , 13 , 17 } });
192- filter->SetDestinationSkipAxes (SkipType{ { { false , false , true } } });
196+
197+ destinationSkipAxes = SkipType{ { { false , false , true } } };
198+ filter->SetDestinationSkipAxes (destinationSkipAxes);
199+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
200+
193201 filter->SetSourceRegion (Utils::SourceSizeType{ { 5 , 6 } });
194202 filter->UpdateLargestPossibleRegion ();
195203 EXPECT_EQ (" 7bca1328ead4ab2c6b89e1cdd1e3fdad" , MD5Hash (filter->GetOutput ()));
196204
197205 filter->SetDestinationIndex ({ { 11 , 13 , 17 } });
198- filter->SetDestinationSkipAxes (SkipType{ { { false , false , true } } });
206+
207+ destinationSkipAxes = SkipType{ { { false , false , true } } };
208+ filter->SetDestinationSkipAxes (destinationSkipAxes);
209+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
210+
199211 filter->SetSourceRegion (Utils::SourceSizeType{ { 5 , 6 } });
200212 filter->UpdateLargestPossibleRegion ();
201213 EXPECT_EQ (" 7bca1328ead4ab2c6b89e1cdd1e3fdad" , MD5Hash (filter->GetOutput ()));
202214
203215
204216 filter->SetDestinationIndex ({ { 11 , 13 , 17 } });
205- filter->SetDestinationSkipAxes (SkipType{ { { true , false , false } } });
217+
218+ destinationSkipAxes = SkipType{ { { true , false , false } } };
219+ filter->SetDestinationSkipAxes (destinationSkipAxes);
220+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
221+
206222 filter->SetSourceRegion (Utils::SourceSizeType{ { 1 , 1 } });
207223 filter->UpdateLargestPossibleRegion ();
208224 EXPECT_EQ (" 2e40b486120da8d8a225d9ab505bc580" , MD5Hash (filter->GetOutput ()));
209225
210226
211227 filter->SetDestinationIndex ({ { 11 , 13 , 17 } });
212228 filter->SetSourceRegion (Utils::SourceSizeType{ { 1 , 1 } });
213- filter->SetDestinationSkipAxes (SkipType{ { { true , true , true } } });
229+
230+ destinationSkipAxes = SkipType{ { { true , true , true } } };
231+ filter->SetDestinationSkipAxes (destinationSkipAxes);
232+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
233+
214234 EXPECT_THROW (filter->VerifyPreconditions (), itk::ExceptionObject);
215235
236+ destinationSkipAxes = SkipType{ { { false , true , true } } };
237+ filter->SetDestinationSkipAxes (destinationSkipAxes);
238+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
216239
217- filter->SetDestinationSkipAxes (SkipType{ { { false , true , true } } });
218240 EXPECT_THROW (filter->VerifyPreconditions (), itk::ExceptionObject);
219241
242+ destinationSkipAxes = SkipType{ { { true , true , false } } };
243+ filter->SetDestinationSkipAxes (destinationSkipAxes);
244+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
220245
221- filter->SetDestinationSkipAxes (SkipType{ { { true , true , false } } });
222246 EXPECT_THROW (filter->VerifyPreconditions (), itk::ExceptionObject);
223247}
224248TEST_F (PasteFixture, InPlace)
@@ -296,18 +320,27 @@ TEST_F(PasteFixture, Paste3_2)
296320 filter->SetDestinationIndex ({ { 11 , 13 , 17 } });
297321 filter->SetSourceRegion (sourceImage->GetLargestPossibleRegion ());
298322
299- filter->SetDestinationSkipAxes (SkipType{ { { true , false , false } } });
323+ SkipType destinationSkipAxes{ { { true , false , false } } };
324+ filter->SetDestinationSkipAxes (destinationSkipAxes);
325+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
326+
300327 filter->UpdateLargestPossibleRegion ();
301328 EXPECT_EQ (" 753e433a43ab8fcf3d2ef0f8c78aef35" , MD5Hash (filter->GetOutput ()));
302329 EXPECT_EQ (0 , filter->GetOutput ()->GetPixel ({ { 12 , 13 , 17 } }));
303330
304- filter->SetDestinationSkipAxes (SkipType{ { { false , true , false } } });
331+ destinationSkipAxes = SkipType{ { { false , true , false } } };
332+ filter->SetDestinationSkipAxes (destinationSkipAxes);
333+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
334+
305335 filter->UpdateLargestPossibleRegion ();
306336 EXPECT_EQ (0 , filter->GetOutput ()->GetPixel ({ { 11 , 14 , 17 } }));
307337 EXPECT_EQ (" 44bd0a10b89c58fd306beee6148fdb4d" , MD5Hash (filter->GetOutput ()));
308338
309339
310- filter->SetDestinationSkipAxes (SkipType{ { { false , false , true } } });
340+ destinationSkipAxes = SkipType{ { { false , false , true } } };
341+ filter->SetDestinationSkipAxes (destinationSkipAxes);
342+ EXPECT_EQ (destinationSkipAxes, filter->GetDestinationSkipAxes ());
343+
311344 filter->UpdateLargestPossibleRegion ();
312345 EXPECT_EQ (" ce630d54304b6eba8cd73ec9617d2cf4" , MD5Hash (filter->GetOutput ()));
313346 EXPECT_EQ (0 , filter->GetOutput ()->GetPixel ({ { 11 , 13 , 18 } }));
0 commit comments