message: Adds a zero-sized array to the spio_parallel test
diff: @@ -81,9 +81,12 @@ TEST(spio_parallel, parallel_writeread)
  Group* flds = root->createGroup("fields");
  Group* flds2 = root->createGroup("fields2");
  + // Add a scalar view under group "a"
  Group* ga = flds->createGroup("a");
  - Group* gb = flds2->createGroup("b");
  ga->createViewScalar<int>("i0", 101 * my_rank);
  +
  + // Add an array view under group "b"
  + Group* gb = flds2->createGroup("b");
  gb->createView("i1")->allocate(DataType::c_int(10));
  int* i1_vals = gb->getView("i1")->getData();
  @@ -92,6 +95,10 @@ TEST(spio_parallel, parallel_writeread)
  i1_vals[i] = (i + 10) * (404 - my_rank - i);
  }
  + // Add an array view of size 0 under group "c"
  + Group* gc = flds2->createGroup("c");
  + gc->createView("i2")->allocate(DataType::c_int(0));
  +
  // The namespace qualifying IOManager is not necessary for compilation
  // (because are already using axom::sidre::IOManager), but we've kept it
  // because the following code is used in the documentation as an example.
  @@ -188,13 +195,18 @@ TEST(spio_parallel, parallel_writeread)
  */
  EXPECT_TRUE(ds2->getRoot()->isEquivalentTo(root));
  + // check group "a", which should contain a view with a single scalar
  + {
  int testvalue =
  ds->getRoot()->getGroup("fields")->getGroup("a")->getView("i0")->getData();
  int testvalue2 =
  ds2->getRoot()->getGroup("fields")->getGroup("a")->getView("i0")->getData();
  EXPECT_EQ(testvalue, testvalue2);
  + }
  + // check group "b", which should contain a view with an array of ints
  + {
  View* view_i1_orig =
  ds->getRoot()->getGroup("fields2")->getGroup("b")->getView("i1");
  View* view_i1_restored =
  @@ -212,6 +224,20 @@ TEST(spio_parallel, parallel_writeread)
  EXPECT_EQ(i1_orig[i], i1_restored[i]);
  }
  }
  + }
  +
  + // check group "c", which should contain a view with an array of size 0
  + {
  + View* view_i2_orig =
  + ds->getRoot()->getGroup("fields2")->getGroup("c")->getView("i2");
  + View* view_i2_restored =
  + ds2->getRoot()->getGroup("fields2")->getGroup("c")->getView("i2");
  +
  + int num_elems_orig = view_i2_orig->getNumElements();
  + int num_elems_rest = view_i2_restored->getNumElements();
  + EXPECT_EQ(0, num_elems_orig);
  + EXPECT_EQ(0, num_elems_rest);
  + }
  delete ds;
  delete ds2;
  