Exemple #1
0
        public void WriteExplicitInstruction()
        {
            var stream = new CodeStream
            {
                new Instruction(OpCode.Mov)
            };

            Assert.That(stream.ToArray(), Is.Not.Empty);
        }
Exemple #2
0
        public void WriteInstruction()
        {
            var stream      = new CodeStream();
            var instruction = new Instruction();

            stream.Add(instruction);

            Assert.That(stream.ToArray(), Is.EqualTo(new[] { instruction }));
        }
Exemple #3
0
        public void WriteMultipleInstruction()
        {
            var stream = new CodeStream();
            var i1     = new Instruction();
            var i2     = new Instruction();

            stream.Add(i1, i2);

            Assert.That(stream.ToArray(), Is.EqualTo(new[] { i1, i2 }));
        }
Exemple #4
0
        public void WriteInstruction()
        {
            var stream =new CodeStream();
            var instruction = new Instruction();
            stream.Add(instruction);

            Assert.That(stream.ToArray(), Is.EqualTo(new[] { instruction }));
        }
Exemple #5
0
        public void WriteExplicitInstruction()
        {
            var stream =new CodeStream
            {
                new Instruction(OpCode.Mov)
            };

            Assert.That(stream.ToArray(), Is.Not.Empty);
        }
Exemple #6
0
        public void WriteMultipleInstruction()
        {
            var stream =new CodeStream();
            var i1 = new Instruction();
            var i2 = new Instruction();
            stream.Add(i1, i2);

            Assert.That(stream.ToArray(), Is.EqualTo(new[] { i1, i2 }));
        }