Beispiel #1
0
        public void ReadShortFloatTest()
        {
            var mem = new MemoryStream();

            mem.WriteByte(0xde);
            mem.WriteByte(0x42);
            mem.Seek(0, SeekOrigin.Begin);
            var reader = new SwfStreamReader(mem);

            Assert.AreEqual(3.43359375f, reader.ReadShortFloat(), "Value");

            Assert.AreEqual(mem.Length, mem.Position, "Should reach end of the stream");
        }
Beispiel #2
0
        public void ReadShortFloatTest()
        {
            var mem = new MemoryStream();
            mem.WriteByte(0xde);
            mem.WriteByte(0x42);
            mem.Seek(0, SeekOrigin.Begin);
            var reader = new SwfStreamReader(mem);

            Assert.AreEqual(3.43359375f, reader.ReadShortFloat(), "Value");

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