diff --git a/Filters/General/Testing/CMakeLists.txt b/Filters/General/Testing/CMakeLists.txt index d2a50043f203da9ffe67a53aeaf00c6a7d8f3349..fa060d26043ba6d8814ddf8ae96f2d11df0a78aa 100644 --- a/Filters/General/Testing/CMakeLists.txt +++ b/Filters/General/Testing/CMakeLists.txt @@ -13,6 +13,7 @@ vtk_module_test_data( Data/fullhead15.png Data/hexa.vtk Data/mb-of-mps.vtm + Data/mb_single_piece_empty_data.vtm Data/mine_with_dates.vtp Data/quadraticTetra01.vtu Data/rectGrid.vtr diff --git a/Filters/General/Testing/Cxx/TestAxisAlignedReflectionFilter.cxx b/Filters/General/Testing/Cxx/TestAxisAlignedReflectionFilter.cxx index bacda5b883e30820c3c3f620f21ad3924f45dfd0..97582e586143aeeecf752a485b54d75280b04024 100644 --- a/Filters/General/Testing/Cxx/TestAxisAlignedReflectionFilter.cxx +++ b/Filters/General/Testing/Cxx/TestAxisAlignedReflectionFilter.cxx @@ -395,6 +395,19 @@ int TestMultiBlockOnlyDataSets(int argc, char* argv[]) return EXIT_SUCCESS; } +int TestMultiBlockEmptyPiece(int argc, char* argv[]) +{ + ReadFileMacro("Data/mb_single_piece_empty_data.vtm", vtkXMLMultiBlockDataReader); + + vtkSmartPointer<vtkPartitionedDataSetCollection> output = + Reflect(reader->GetOutputPort(), true, true, vtkAxisAlignedReflectionFilter::X_MIN); + + AssertMacro(output->GetNumberOfPartitionedDataSets() == 2, output->GetClassName(), + "Incorrect number of partitioned datasets") + + return EXIT_SUCCESS; +} + // This function tests all the input types, and each input type will test a different plane mode. int TestAxisAlignedReflectionFilter(int argc, char* argv[]) { @@ -402,5 +415,5 @@ int TestAxisAlignedReflectionFilter(int argc, char* argv[]) TestRectilinearGrid(argc, argv) || TestExplicitStructuredGrid(argc, argv) || TestStructuredGrid(argc, argv) || TestPolyData(argc, argv) || TestHyperTreeGrid(argc, argv) || TestPartitionedDataSetCollection(argc, argv) || TestMultiBlockMultiPiece(argc, argv) || - TestMultiBlockOnlyDataSets(argc, argv); + TestMultiBlockOnlyDataSets(argc, argv) || TestMultiBlockEmptyPiece(argc, argv); } diff --git a/Testing/Data/mb_single_piece_empty_data.vtm.sha512 b/Testing/Data/mb_single_piece_empty_data.vtm.sha512 new file mode 100644 index 0000000000000000000000000000000000000000..7bdb8145e75b69f048692716ee5831f1d1ec2c62 --- /dev/null +++ b/Testing/Data/mb_single_piece_empty_data.vtm.sha512 @@ -0,0 +1 @@ +4aa443c77a1817d8a115465ec00759c3cc1664a3f1973d9ebc938511e827d34604f5f1412b1f12face3c7987c0dd1ffd47552b7a6a5cf8c5bd955421c9af8eb7