Ejemplo n.º 1
0
 public void H5Oopen_by_idxTest2()
 {
     Assert.IsFalse(
         H5O.open_by_idx(Utilities.RandomInvalidHandle(), ".",
                         H5.index_t.NAME, H5.iter_order_t.NATIVE,
                         44) >= 0);
     Assert.IsFalse(
         H5O.open_by_idx(m_v2_class_file, ".",
                         H5.index_t.NAME, H5.iter_order_t.NATIVE,
                         hsize_t.MaxValue) >= 0);
 }
Ejemplo n.º 2
0
        public void H5Oopen_by_idxTest1()
        {
            Assert.IsTrue(
                H5G.close(H5G.create(m_v0_test_file, "A")) >= 0);
            Assert.IsTrue(
                H5G.close(H5G.create(m_v0_test_file, "AA")) >= 0);
            Assert.IsTrue(
                H5G.close(H5G.create(m_v0_test_file, "AAA")) >= 0);
            Assert.IsTrue(
                H5G.close(H5G.create(m_v0_test_file, "AAAA")) >= 0);

            hid_t obj = H5O.open_by_idx(m_v0_test_file, ".", H5.index_t.NAME,
                                        H5.iter_order_t.NATIVE, 0);

            Assert.IsTrue(obj >= 0);
            Assert.IsTrue(H5O.close(obj) >= 0);

            obj = H5O.open_by_idx(m_v0_test_file, ".", H5.index_t.NAME,
                                  H5.iter_order_t.NATIVE, 2);
            Assert.IsTrue(obj >= 0);
            Assert.IsTrue(H5O.close(obj) >= 0);

            Assert.IsTrue(
                H5G.close(H5G.create(m_v2_test_file, "A")) >= 0);
            Assert.IsTrue(
                H5G.close(H5G.create(m_v2_test_file, "AA")) >= 0);
            Assert.IsTrue(
                H5G.close(H5G.create(m_v2_test_file, "AAA")) >= 0);
            Assert.IsTrue(
                H5G.close(H5G.create(m_v2_test_file, "AAAA")) >= 0);

            obj = H5O.open_by_idx(m_v2_test_file, ".", H5.index_t.NAME,
                                  H5.iter_order_t.NATIVE, 0);
            Assert.IsTrue(obj >= 0);
            Assert.IsTrue(H5O.close(obj) >= 0);

            obj = H5O.open_by_idx(m_v2_test_file, ".", H5.index_t.NAME,
                                  H5.iter_order_t.NATIVE, 2);
            Assert.IsTrue(obj >= 0);
            Assert.IsTrue(H5O.close(obj) >= 0);
        }