public void H5Tget_tagTest1() { hid_t dtype = H5T.create(H5T.class_t.OPAQUE, new IntPtr(1024)); Assert.IsTrue(dtype >= 0); Assert.IsTrue( H5T.set_tag(dtype, "Mary had a little lamb...") >= 0); IntPtr tag = H5T.get_tag(dtype); Assert.IsTrue(tag.ToInt64() >= 0); Assert.IsTrue(Marshal.PtrToStringAnsi(tag) == "Mary had a little lamb..."); Assert.IsTrue(H5.free_memory(tag) >= 0); Assert.IsTrue(H5T.close(dtype) >= 0); }
public void H5Tget_tagTest2() { IntPtr tag = H5T.get_tag(Utilities.RandomInvalidHandle()); Assert.IsTrue(tag == IntPtr.Zero); }