File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1828,6 +1828,30 @@ TEST(sidre_view, clear_view)
18281828
18291829// ------------------------------------------------------------------------------
18301830
1831+ TEST (sidre_view, deep_copy_shape)
1832+ {
1833+ DataStore* ds = new DataStore ();
1834+ Group* root = ds->getRoot ();
1835+ Group* groupA = root->createGroup (" groupA" );
1836+ Group* groupB = root->createGroup (" groupB" );
1837+
1838+ {
1839+ const IndexType shapeA[3 ] = {3 , 2 , 5 };
1840+ View* viewA = groupA->createViewWithShape (" array3d" , INT_ID, 3 , shapeA);
1841+ View* viewB = groupB->deepCopyView (viewA);
1842+ IndexType shapeB[3 ] = { -1 , -1 , -1 };
1843+ viewB->getShape (3 , shapeB);
1844+ EXPECT_EQ (viewB->getNumDimensions (), 3 );
1845+ EXPECT_EQ (shapeB[0 ], shapeA[0 ]);
1846+ EXPECT_EQ (shapeB[1 ], shapeA[1 ]);
1847+ EXPECT_EQ (shapeB[2 ], shapeA[2 ]);
1848+ }
1849+
1850+ delete ds;
1851+ }
1852+
1853+ // ------------------------------------------------------------------------------
1854+
18311855#ifdef AXOM_USE_UMPIRE
18321856
18331857class UmpireTest : public ::testing::TestWithParam<int >
You can’t perform that action at this time.
0 commit comments