Пример #1
0
        public void WriteAndReadOneUnicodeString()
        {
            try
            {
                string test     = "Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο";
                string filename = Path.Combine(folder, "testUnicodeString.H5");


                var fileId = Hdf5.CreateFile(filename);
                Hdf5.WriteUnicodeString(fileId, "/test", test);
                Assert.IsTrue(Hdf5.CloseFile(fileId) >= 0);


                fileId = Hdf5.OpenFile(filename);
                string readStr = Hdf5.ReadUnicodeString(fileId, "/test");
                //var readStr = Hdf5.ReadStrings(fileId, "/test");
                Assert.IsTrue(test == readStr);
                Assert.IsTrue(Hdf5.CloseFile(fileId) >= 0);
                Hdf5.CloseFile(fileId);
            }
            catch (Exception ex)
            {
                CreateExceptionAssert(ex);
            }
        }