Esempio n. 1
0
def test_SimpleStringState():
    state = SimpleStringState("A", 0, -1)
    assert state.get_char_ord(0) == ord("A")
    assert state.lower(state.get_char_ord(0)) == ord("a")
Esempio n. 2
0
def create_context(string, string_position, end):
    state = SimpleStringState(string, 0, end)
    state.string_position = string_position
    return state._MatchContext(state, [])
Esempio n. 3
0
def create_context(string, string_position, end):
    state = SimpleStringState(string, 0, end)
    state.string_position = string_position
    return state._MatchContext(state, [])
Esempio n. 4
0
def test_SimpleStringState():
    state = SimpleStringState("A", 0, -1)
    assert state.get_char_ord(0) == ord("A")
    assert state.lower(state.get_char_ord(0)) == ord("a")