예제 #1
0
def test_simple_paranthesis():
    assert validate("()")
예제 #2
0
def test_empty_input():
    assert validate("")
예제 #3
0
def test_performance():
    start = time.time()
    validate("(()" * 20)
    end = time.time()
    assert end - start < 1
예제 #4
0
def test_foo_bar():
    assert validate("()[]")
    assert validate("{()}[[{}]]")
예제 #5
0
def test_unbalanced():
    assert not validate("{{)(}}")
예제 #6
0
def test_nested_parens():
    assert validate("([])")
예제 #7
0
def test_double_xxxxx():
    assert not validate("())")
예제 #8
0
def test_double_parenthesis():
    assert not validate("([)]")
예제 #9
0
def test_simple_paranthesis():
    assert not validate(")(")
예제 #10
0
def test_simple_negative():
    assert not validate("(")