Пример #1
0
def test_parsefail5(parser):
    input_str = '(* (#a 5).'
    expected = 'Syntax Error'
    tokens = scanner.scan(input_str)
    assert parser.parse(tokens) == expected
Пример #2
0
def test_parse3(parser):
    input_str = '(* #b2 (- (+ 2 #a1) (* 12 13))).'
    expected = 'Valid Expression'
    tokens = scanner.scan(input_str)
    assert parser.parse(tokens) == expected
Пример #3
0
def test_parse4(parser):
    input_str = '(/ #x #y).'
    expected = 'Valid Expression'
    tokens = scanner.scan(input_str)
    assert parser.parse(tokens) == expected
Пример #4
0
def test_parse2(parser):
    input_str = '(* 10 #myVar).'
    expected = 'Valid Expression'
    tokens = scanner.scan(input_str)
    assert parser.parse(tokens) == expected