public void MatchBegin() { const string str = "psaiodusaiu saiud saiduais"; const string pattern = "psa"; Assert.AreEqual(0, StringAlgorithms.PatternMatch(str, pattern)); }
public void PatternIsBigger() { const string str = "psaiodusaiu saiud saiduais"; const string pattern = "ppsaiodusaiu saiud saiduaisa"; Assert.AreEqual(-1, StringAlgorithms.PatternMatch(str, pattern)); }
public void DoesNotMatch() { const string str = "psaiodusaiu saiud saiduais"; const string pattern = "xy"; Assert.AreEqual(-1, StringAlgorithms.PatternMatch(str, pattern)); }
public void AlmostMatchAtEnd() { const string str = "psaiodusaiu saiud saiduais"; const string pattern = "isx"; Assert.AreEqual(-1, StringAlgorithms.PatternMatch(str, pattern)); }
public void Equals() { const string str = "a"; const string pattern = "a"; Assert.AreEqual(0, StringAlgorithms.PatternMatch(str, pattern)); }