예제 #1
0
파일: MiscTests.cs 프로젝트: yang123vc/iced
        void FormatMnemonicOptions1(string hexBytes, Code code, int bitness, string formattedString, FormatMnemonicOptions options)
        {
            var decoder = Decoder.Create(bitness, new ByteArrayCodeReader(hexBytes));

            decoder.Decode(out var instr);
            Assert.Equal(code, instr.Code);
            var formatter = IntelFormatterFactory.Create();
            var output    = new StringBuilderFormatterOutput();

            formatter.FormatMnemonic(ref instr, output, options);
            var actualFormattedString = output.ToStringAndReset();

#pragma warning disable xUnit2006 // Do not use invalid string equality check
            // Show the full string without ellipses by using Equal<string>() instead of Equal()
            Assert.Equal <string>(formattedString, actualFormattedString);
#pragma warning restore xUnit2006 // Do not use invalid string equality check
        }
 void Format(int index, InstructionInfo info, string formattedString) => FormatBase(index, info, formattedString, IntelFormatterFactory.Create_NoMemSize());
예제 #3
0
 void Format(int index, object number, string formattedString) => FormatBase(index, number, formattedString, IntelFormatterFactory.Create_Numbers());
예제 #4
0
 void Test() => TestBase(IntelFormatterFactory.Create());
예제 #5
0
 void Format(int index, int resultDispl, SymbolInstructionInfo info, string formattedString) => FormatBase(index, resultDispl, info, formattedString, IntelFormatterFactory.Create_Resolver(info.SymbolResolver.Clone()));
예제 #6
0
 void Format(Register register, string formattedString) => FormatBase(register, formattedString, IntelFormatterFactory.Create_Registers());
예제 #7
0
 void Format(int index, SymbolInstructionInfo info, string formattedString) => FormatBase(index, info, formattedString, IntelFormatterFactory.Create_Resolver(info.SymbolResolver));
예제 #8
0
 void Format(int index, OptionsInstructionInfo info, string formattedString) => FormatBase(index, info, formattedString, IntelFormatterFactory.Create_Options());