Ejemplo n.º 1
0
        public void nullTestingArrays()
        {
            string nonNullString = "abracadabra";
            SuffixArray theSuffixArray = new SuffixArray(nonNullString);
            bool result = theSuffixArray.FindSubstring(null);
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("");
            Assert.AreEqual(false, result);
        }
Ejemplo n.º 2
0
        public void nullTestingArrays()
        {
            string      nonNullString  = "abracadabra";
            SuffixArray theSuffixArray = new SuffixArray(nonNullString);
            bool        result         = theSuffixArray.FindSubstring(null);

            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("");
            Assert.AreEqual(false, result);
        }
Ejemplo n.º 3
0
        public void successfulStringsArrays()
        {
            string testString = "abracadabra";
            SuffixArray theSuffixArray = new SuffixArray(testString);
            bool result = theSuffixArray.FindSubstring("bra");
            Assert.AreEqual(true, result);

            result = theSuffixArray.FindSubstring("ab");
            Assert.AreEqual(true, result);

            result = theSuffixArray.FindSubstring("cada");
            Assert.AreEqual(true, result);

            result = theSuffixArray.FindSubstring("dab");
            Assert.AreEqual(true, result);
        }
Ejemplo n.º 4
0
        public void successfulStringsArrays()
        {
            string      testString     = "abracadabra";
            SuffixArray theSuffixArray = new SuffixArray(testString);
            bool        result         = theSuffixArray.FindSubstring("bra");

            Assert.AreEqual(true, result);

            result = theSuffixArray.FindSubstring("ab");
            Assert.AreEqual(true, result);

            result = theSuffixArray.FindSubstring("cada");
            Assert.AreEqual(true, result);

            result = theSuffixArray.FindSubstring("dab");
            Assert.AreEqual(true, result);
        }
Ejemplo n.º 5
0
        public void failedStringsArrays()
        {
            string      testString     = "abracadabra";
            SuffixArray theSuffixArray = new SuffixArray(testString);
            bool        result;

            result = theSuffixArray.FindSubstring("jason");
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("masud");
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("testing");
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("notastring");
            Assert.AreEqual(false, result);
        }
Ejemplo n.º 6
0
        public void failedStringsArrays()
        {
            string testString = "abracadabra";
            SuffixArray theSuffixArray = new SuffixArray(testString);
            bool result;

            result = theSuffixArray.FindSubstring("jason");
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("masud");
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("testing");
            Assert.AreEqual(false, result);

            result = theSuffixArray.FindSubstring("notastring");
            Assert.AreEqual(false, result);
        }