Пример #1
0
        public void Df_FormatAddress()
        {
            var list = new List <TextSpan>();
            var df   = new DisassemblyFormatter(program, program.Architecture, null, list);

            df.WriteAddress("foo", Address.Ptr32(0x1234));
            df.NewLine();

            Assert.AreEqual("foo", list[0].GetText());
            Assert.IsInstanceOf <Address>(list[0].Tag);
        }
        public void Df_FormatAddress_ScannedProcedure()
        {
            var list = new List <TextSpan>();

            program.Procedures.Add(Address.Ptr32(0x1234), new Procedure("fn_renamed", new Frame(PrimitiveType.Word32)));
            var df = new DisassemblyFormatter(program, null, list);

            df.WriteAddress("foo", Address.Ptr32(0x1234));
            df.NewLine();

            Assert.AreEqual("fn_renamed", list[0].GetText());
            Assert.IsInstanceOf <Address>(list[0].Tag);
        }