Exemplo n.º 1
0
        public void GetBytes_LoadLibraryInstruction()
        {
            var instruction   = new LoadLibraryInstruction("MyLib");
            var expectedBytes = InstructionByteBuilder.Create()
                                .Opcode(Opcode.Load, LoadKind.Library, "MyLib")
                                .AsSpan();

            Assert.True(expectedBytes.SequenceEqual(instruction.GetBytes()));
        }
Exemplo n.º 2
0
        public void ToString_LoadLibraryInstruction()
        {
            var loadInstruction = new LoadLibraryInstruction("MyLib");

            Assert.Equal("ldl MyLib", loadInstruction.ToString());
        }
Exemplo n.º 3
0
 public void VisitLoadLibrary(LoadLibraryInstruction instruction) => IncrementCallCount(nameof(VisitLoadLibrary));