Exemplo n.º 1
0
        void FormatMnemonicOptions(string hexBytes, Code code, int bitness, string formattedString, FormatMnemonicOptions options)
        {
            var decoder = Decoder.Create(bitness, new ByteArrayCodeReader(hexBytes));

            decoder.Decode(out var instruction);
            Assert.Equal(code, instruction.Code);
            var formatter = FormatterFactory.Create();
            var output    = new StringOutput();

            formatter.FormatMnemonic(instruction, 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
        }
Exemplo n.º 2
0
 void Format_Misc(int index, InstructionInfo info, string formattedString) => FormatBase(index, info, formattedString, FormatterFactory.Create());
Exemplo n.º 3
0
 void Test() => TestBase(FormatterFactory.Create());