Exemple #1
0
 public int[] FindAllOccurrences_IDM_Test(string text, string pattern)
 {
     return(RabinKarp.FindAllOccurrences(text, pattern).ToArray());
 }
Exemple #2
0
        public void FindAllOccurrences_IndexCheck(string t, string p, int[] expectedIndices)
        {
            List <int> result = RabinKarp.FindAllOccurrences(t, p);

            Assert.AreEqual(result, new List <int>(expectedIndices));
        }