Пример #1
0
        public void WriteShortFloatTest()
        {
            var mem    = new MemoryStream();
            var writer = new SwfStreamWriter(mem);

            writer.WriteShortFloat(3.43359375f);
            mem.Seek(0, SeekOrigin.Begin);

            Assert.AreEqual(0xde, mem.ReadByte());
            Assert.AreEqual(0x42, mem.ReadByte());

            Assert.AreEqual(mem.Length, mem.Position, "Should reach end of the stream");
        }
Пример #2
0
        public void WriteShortFloatTest()
        {
            var mem = new MemoryStream();
            var writer = new SwfStreamWriter(mem);
            writer.WriteShortFloat(3.43359375f);
            mem.Seek(0, SeekOrigin.Begin);

            Assert.AreEqual(0xde, mem.ReadByte());
            Assert.AreEqual(0x42, mem.ReadByte());

            Assert.AreEqual(mem.Length, mem.Position, "Should reach end of the stream");
        }