Example #1
0
        public void WriteAndReadDoubleViaMemoryFile()
        {
            var file = new Torch.IO.MemoryFile("rwb");

            Assert.IsNotNull(file);
            Assert.IsTrue(file.CanWrite);
            file.WriteDouble(13);
            file.WriteDouble(17);
            file.Seek(0);
            var rd = file.ReadDouble();

            Assert.AreEqual(13, rd);
            rd = file.ReadDouble();
            Assert.AreEqual(17, rd);
            file.Close();
            Assert.IsFalse(file.IsOpen);
        }