Beispiel #1
0
 public void Match_Char()
 {
     var value = new ValueCursor("abc");
     Assert.True(value.MoveNext(), "GetNext() 1");
     Assert.True(value.Match('a'), "First character");
     Assert.True(value.Match('b'), "Second character");
     Assert.True(value.Match('c'), "Third character");
     Assert.False(value.MoveNext(), "GetNext() end");
 }
Beispiel #2
0
 public void Match_StringOverLongStringToMatch()
 {
     var value = new ValueCursor("x");
     Assert.True(value.MoveNext());
     Assert.False(value.Match("long string"));
     ValidateCurrentCharacter(value, 0, 'x');
 }
Beispiel #3
0
 public void Match_StringNotMatched()
 {
     var value = new ValueCursor("xabcdef");
     Assert.True(value.MoveNext(), "GetNext() 1");
     Assert.False(value.Match("abc"));
     ValidateCurrentCharacter(value, 0, 'x');
 }
Beispiel #4
0
 public void Match_String()
 {
     var value = new ValueCursor("abc");
     Assert.True(value.MoveNext(), "GetNext() 1");
     Assert.True(value.Match("abc"));
     Assert.False(value.MoveNext(), "GetNext() end");
 }
Beispiel #5
0
 public void Match_StringPartial()
 {
     var value = new ValueCursor("abcdef");
     Assert.True(value.MoveNext(), "GetNext() 1");
     Assert.True(value.Match("abc"));
     ValidateCurrentCharacter(value, 3, 'd');
 }