예제 #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);
        }
예제 #2
0
        public void WriteDoubleToMemoryFile()
        {
            var file = new Torch.IO.MemoryFile("wb");

            Assert.IsNotNull(file);
            Assert.IsTrue(file.CanWrite);
            file.WriteDouble(17);
            file.Close();
            Assert.IsFalse(file.IsOpen);
        }