コード例 #1
0
ファイル: SwfStreamWriterTest.cs プロジェクト: shhadi/SwfLib
        public void WriteUInt32Test()
        {
            var mem    = new MemoryStream();
            var writer = new SwfStreamWriter(mem);

            writer.WriteUInt32(0x456e7120);
            mem.Seek(0, SeekOrigin.Begin);

            Assert.AreEqual(0x20, mem.ReadByte());
            Assert.AreEqual(0x71, mem.ReadByte());
            Assert.AreEqual(0x6e, mem.ReadByte());
            Assert.AreEqual(0x45, mem.ReadByte());

            Assert.AreEqual(mem.Length, mem.Position, "Should reach end of the stream");
        }
コード例 #2
0
        public void WriteUInt32Test()
        {
            var mem = new MemoryStream();
            var writer = new SwfStreamWriter(mem);
            writer.WriteUInt32(0x456e7120);
            mem.Seek(0, SeekOrigin.Begin);

            Assert.AreEqual(0x20, mem.ReadByte());
            Assert.AreEqual(0x71, mem.ReadByte());
            Assert.AreEqual(0x6e, mem.ReadByte());
            Assert.AreEqual(0x45, mem.ReadByte());

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