static void Test_IndexOf() { RleArray <char> chars = new RleArray <char>(); Set(chars, "aabbcca"); TestUtl.AssertEquals(0, chars.IndexOf('a')); TestUtl.AssertEquals(2, chars.IndexOf('b')); TestUtl.AssertEquals(4, chars.IndexOf('c')); TestUtl.AssertEquals(-1, chars.IndexOf('d')); }
public void IndexOf() { RleArray <char> chars = new RleArray <char>(); Set(chars, "aabbcca"); Assert.AreEqual(0, chars.IndexOf('a')); Assert.AreEqual(2, chars.IndexOf('b')); Assert.AreEqual(4, chars.IndexOf('c')); Assert.AreEqual(-1, chars.IndexOf('d')); }