예제 #1
0
        public void H5Pset_append_flushTestSWMR2()
        {
            hid_t dapl = H5P.create(H5P.DATASET_ACCESS);

            Assert.IsTrue(dapl >= 0);

            hsize_t[] boundary = { 1, 1 };

            H5D.append_cb_t cb = append_func;

            Assert.IsTrue(
                H5P.set_append_flush(dapl, 2, boundary, cb, IntPtr.Zero) >= 0);

            hsize_t[] check_boundary = { 0, 0, 0 };

            H5D.append_cb_t check_cb = null;

            IntPtr check_ptr = new IntPtr(4711);

            Assert.IsTrue(
                H5P.get_append_flush(dapl, 2, check_boundary, ref check_cb,
                                     ref check_ptr) >= 0);

            Assert.IsTrue(check_boundary[0] == 1);
            Assert.IsTrue(check_boundary[1] == 1);
            Assert.IsTrue(check_boundary[2] == 0);

            Assert.IsTrue(check_cb == cb);

            Assert.IsTrue(check_ptr == IntPtr.Zero);

            Assert.IsTrue(H5P.close(dapl) >= 0);
        }