public void BruteForceNegativeLongerA() { var testA = "bbbextm"; //bbbextm var testB = "bbb#extm"; //bbextm Assert.IsFalse(BackspaceStringCompare.TwoPointer(testA, testB)); }
public void BruteForceNegativeSameLength() { var testA = "a#c"; //c var testB = "b"; //b Assert.IsFalse(BackspaceStringCompare.TwoPointer(testA, testB)); }
public void BruteForceNegativeLongerB() { var testA = "abcd"; var testB = "abc"; Assert.IsFalse(BackspaceStringCompare.TwoPointer(testA, testB)); }
public void BruteForcePositiveDifferentLength() { var testA = "nzp#o#g"; //"nzg" var testB = "b#nzp#o#g"; //"nzg Assert.IsTrue(BackspaceStringCompare.TwoPointer(testA, testB)); }
public void BruteForcePositiveBackspaceString() { var testA = "a########bc###"; var testB = "a#b#c#"; Assert.IsTrue(BackspaceStringCompare.TwoPointer(testA, testB)); }
public void BruteForceNulls() { Assert.IsTrue(BackspaceStringCompare.TwoPointer(null, null)); Assert.IsFalse(BackspaceStringCompare.TwoPointer("a", null)); Assert.IsFalse(BackspaceStringCompare.TwoPointer(null, "b")); }
public void BruteForceEmptyString() { Assert.IsTrue(BackspaceStringCompare.TwoPointer(string.Empty, string.Empty)); }