Exemplo n.º 1
0
 public void BasicTests()
 {
     Assert.AreEqual(4, CalculateStringRotation.ShiftedDiff("eecoff", "coffee"));
     Assert.AreEqual(-1, CalculateStringRotation.ShiftedDiff("Moose", "moose"));
     Assert.AreEqual(2, CalculateStringRotation.ShiftedDiff("isn't", "'tisn"));
     Assert.AreEqual(0, CalculateStringRotation.ShiftedDiff("Esham", "Esham"));
     Assert.AreEqual(0, CalculateStringRotation.ShiftedDiff(" ", " "));
     Assert.AreEqual(-1, CalculateStringRotation.ShiftedDiff("hoop", "pooh"));
     Assert.AreEqual(-1, CalculateStringRotation.ShiftedDiff("  ", " "));
 }
Exemplo n.º 2
0
 public void BasicTest1()
 {
     Assert.AreEqual(4, CalculateStringRotation.ShiftedDiff("eecoff", "coffee"));
 }
Exemplo n.º 3
0
 public void BasicTest7()
 {
     Assert.AreEqual(-1, CalculateStringRotation.ShiftedDiff("  ", " "));
 }
Exemplo n.º 4
0
 public void BasicTest6()
 {
     Assert.AreEqual(-1, CalculateStringRotation.ShiftedDiff("hoop", "pooh"));
 }
Exemplo n.º 5
0
 public void BasicTest4()
 {
     Assert.AreEqual(0, CalculateStringRotation.ShiftedDiff("Esham", "Esham"));
 }
Exemplo n.º 6
0
 public void BasicTest3()
 {
     Assert.AreEqual(2, CalculateStringRotation.ShiftedDiff("isn't", "'tisn"));
 }
Exemplo n.º 7
0
 public void BasicTest2()
 {
     Assert.AreEqual(-1, CalculateStringRotation.ShiftedDiff("Moose", "moose"));
 }