Exemplo n.º 1
0
        public void Wsfl_WarnOnError()
        {
            Given_WineSpecLoader_32("foo.spec",
                                    "@ stdcall flox($-@garbage fosforsyra $!garbage  \n" +
                                    "@ stdcall foo(ptr ptr)\n");
            listener.Expect(l => l.Warn(
                                Arg <ICodeLocation> .Is.NotNull,
                                Arg <string> .Is.NotNull,
                                Arg <object[]> .Is.NotNull));
            mr.ReplayAll();

            var lib = wsfl.Load(platform, new TypeLibrary());
            var mod = lib.Modules["FOO.DLL"];

            Assert.AreEqual(1, mod.ServicesByName.Count);
            Assert.AreEqual("foo", mod.ServicesByName["foo"].Name);
        }
Exemplo n.º 2
0
        public void Prld_Partial_UserProc()
        {
            var sProject = new Project_v4
            {
                ArchitectureName = "testArch",
                PlatformName     = "testOS",
                Inputs           =
                {
                    new DecompilerInput_v4
                    {
                        User = new UserData_v4
                        {
                            Procedures =
                            {
                                new Procedure_v1
                                {
                                    Address   = "00123400",
                                    Decompile = false,
                                }
                            }
                        }
                    }
                }
            };

            var ldr = mockFactory.CreateLoader();

            Given_TestArch();
            Given_TestOS();
            var addrNav = mr.Stub <ICodeLocation>();

            listener.Stub(l => l.CreateAddressNavigator(null, null))
            .IgnoreArguments()
            .Return(addrNav);
            listener.Expect(l => l.Warn(null, null, null))
            .IgnoreArguments();
            mr.ReplayAll();

            var prld = new ProjectLoader(sc, ldr, listener);

            prld.LoadProject("foo.dcproject", sProject);

            mr.VerifyAll();
        }
Exemplo n.º 3
0
 public void SFP_32_Invalid_S()
 {
     eventListener.Expect(e => e.CreateAddressNavigator(null, null)).IgnoreArguments();
     eventListener.Expect(e => e.Warn(null, null, new object[0])).IgnoreArguments();
     ParseChar32("%S");
 }