예제 #1
0
        public void BruteForceNegativeLongerA()
        {
            var testA = "bbbextm";  //bbbextm
            var testB = "bbb#extm"; //bbextm

            Assert.IsFalse(BackspaceStringCompare.TwoPointer(testA, testB));
        }
예제 #2
0
        public void BruteForceNegativeSameLength()
        {
            var testA = "a#c";  //c
            var testB = "b";    //b

            Assert.IsFalse(BackspaceStringCompare.TwoPointer(testA, testB));
        }
예제 #3
0
        public void BruteForceNegativeLongerB()
        {
            var testA = "abcd";
            var testB = "abc";

            Assert.IsFalse(BackspaceStringCompare.TwoPointer(testA, testB));
        }
예제 #4
0
        public void BruteForcePositiveDifferentLength()
        {
            var testA = "nzp#o#g";      //"nzg"
            var testB = "b#nzp#o#g";    //"nzg

            Assert.IsTrue(BackspaceStringCompare.TwoPointer(testA, testB));
        }
예제 #5
0
        public void BruteForcePositiveBackspaceString()
        {
            var testA = "a########bc###";
            var testB = "a#b#c#";

            Assert.IsTrue(BackspaceStringCompare.TwoPointer(testA, testB));
        }
예제 #6
0
        public void BruteForceNulls()
        {
            Assert.IsTrue(BackspaceStringCompare.TwoPointer(null, null));

            Assert.IsFalse(BackspaceStringCompare.TwoPointer("a", null));
            Assert.IsFalse(BackspaceStringCompare.TwoPointer(null, "b"));
        }
예제 #7
0
 public void BruteForceEmptyString()
 {
     Assert.IsTrue(BackspaceStringCompare.TwoPointer(string.Empty, string.Empty));
 }