예제 #1
0
        public void NIR_Compare_No_Module_anywhere()
        {
            var nirNullModule1 = new NamedImportReference(Address.Ptr64(0x123400), null, "malloc", SymbolType.ExternalProcedure);
            var nirNullModule2 = new NamedImportReference(Address.Ptr64(0x123400), null, "malloc", SymbolType.ExternalProcedure);

            Assert.AreEqual(0, nirNullModule1.CompareTo(nirNullModule2));
        }
예제 #2
0
        public void NIR_Compare()
        {
            var nir1 = new NamedImportReference(Address.Ptr64(0x123400), "libc.so", "malloc", SymbolType.ExternalProcedure);
            var nir2 = new NamedImportReference(Address.Ptr64(0x123400), "libc.so", "malloc", SymbolType.ExternalProcedure);

            Assert.AreEqual(0, nir1.CompareTo(nir2));
        }
        public void NIR_Compare_No_Module_2()
        {
            var nirNullModule1 = new NamedImportReference(Address.Ptr64(0x123400), null, "malloc");
            var nirNullModule2 = new NamedImportReference(Address.Ptr64(0x123400), "libc.so", "malloc");

            Assert.AreEqual(-1, nirNullModule1.CompareTo(nirNullModule2));
        }