Example #1
0
def test_sums3():
    assert f('b*ac..a*.b*+ b 3') == 3
Example #2
0
def test_sums():
    assert f('aaa..ab.+aab..+* a 1') == 2
Example #3
0
def test_sums2():
    assert f('aaa..ab.+aab..+* a 4') == 5
Example #4
0
def test_stars():
    assert f('a*bc..*a*. a 1') == 1
Example #5
0
def test_simpleStar():
    assert f('a* a 4') == 4
Example #6
0
def test_simpleConcats():
    assert f('aa.b.a.c. a 2') == 5
Example #7
0
def test_simpleSum():
    assert f('ab+c+a+ a 1') == 1
Example #8
0
def test_inf():
    assert f('b*ac*.. c 1') == 'INF'
Example #9
0
def test_error():
    assert f('b*ac*. a 1') == 'ERROR'
Example #10
0
def test_justconcats():
    assert f('b*ac..a*.b*. b 1') == 3