Exemple #1
0
        public void StrFind_TooShort()
        {
            Given_Image(0x23, 0);
            mr.ReplayAll();

            var sf = new StringFinder(program);
            Assert.AreEqual(0, sf.FindStrings(StringType.NullTerminated(PrimitiveType.Char), 5).Count());
        }
Exemple #2
0
        public void StrFind_SingleMatch()
        {
            Given_Image(0x41, 0);
            mr.ReplayAll();

            var sf = new StringFinder(program);
            var hits = sf.FindStrings(StringType.NullTerminated(PrimitiveType.Char), 1).ToArray();
            Assert.AreEqual(1, hits.Length);
            Assert.AreEqual(Address.Ptr32(0x00400000), hits[0].Address);
        }