public void H5Pget_virtual_vspaceTestVDS1() { hid_t vds = H5D.open(m_vds_class_file, "VDS"); Assert.IsTrue(vds >= 0); hid_t dcpl = H5D.get_create_plist(vds); Assert.IsTrue(dcpl >= 0); IntPtr count = IntPtr.Zero; Assert.IsTrue(H5P.get_virtual_count(dcpl, ref count) >= 0); Assert.IsTrue(3 == count.ToInt32()); for (int i = 0; i < count.ToInt32(); ++i) { size_t index = new size_t(i); hid_t vspace = H5P.get_virtual_vspace(dcpl, index); Assert.IsTrue(vspace >= 0); Assert.IsTrue(H5S.is_regular_hyperslab(vspace) > 0); Assert.IsTrue(H5S.close(vspace) >= 0); } Assert.IsTrue(H5P.close(dcpl) >= 0); Assert.IsTrue(H5D.close(vds) >= 0); }
public void H5Pget_virtual_dsetnameTestVDS1() { hid_t vds = H5D.open(m_vds_class_file, "VDS"); Assert.IsTrue(vds >= 0); hid_t dcpl = H5D.get_create_plist(vds); Assert.IsTrue(dcpl >= 0); IntPtr count = IntPtr.Zero; Assert.IsTrue(H5P.get_virtual_count(dcpl, ref count) >= 0); Assert.IsTrue(3 == count.ToInt32()); string[] names = { "A", "B", "C" }; for (int i = 0; i < count.ToInt32(); ++i) { size_t index = new ssize_t(i); ssize_t len = H5P.get_virtual_filename(dcpl, index, null, IntPtr.Zero); Assert.IsTrue(len.ToInt32() > 0); StringBuilder name = new StringBuilder(len.ToInt32() + 1); len = H5P.get_virtual_dsetname(dcpl, index, name, len + 1); Assert.IsTrue(len.ToInt32() > 0); Assert.IsTrue(name.ToString() == names[i]); } Assert.IsTrue(H5P.close(dcpl) >= 0); Assert.IsTrue(H5D.close(vds) >= 0); }
public void H5Pget_virtual_countTestVDS1() { hid_t vds = H5D.open(m_vds_class_file, "VDS"); Assert.IsTrue(vds >= 0); hid_t dcpl = H5D.get_create_plist(vds); Assert.IsTrue(dcpl >= 0); IntPtr count = IntPtr.Zero; Assert.IsTrue(H5P.get_virtual_count(dcpl, ref count) >= 0); Assert.IsTrue(3 == count.ToInt32()); Assert.IsTrue(H5P.close(dcpl) >= 0); Assert.IsTrue(H5D.close(vds) >= 0); }