示例#1
0
def test_split5():
    expr      =  Basic(2, Basic(5,  3), 8)
    expected  = {Basic(0, Basic(0,  0), 10),
                 Basic(0, Basic(10, 0), 10)}

    brl = canon(branch5)
    assert set(brl(expr)) == expected
示例#2
0
def test_split5():
    expr = Basic(2, Basic(5,  3), 8)
    expected = set([Basic(0, Basic(0,  0), 10),
                 Basic(0, Basic(10, 0), 10)])

    brl = canon(branch5)
    assert set(brl(expr)) == expected
示例#3
0
def test_zero_ints():
    expr      =  Basic(2, Basic(5, 3), 8)
    expected  = {Basic(0, Basic(0, 0), 0)}

    brl = canon(posdec)
    assert set(brl(expr)) == expected
示例#4
0
def test_zero_ints():
    expr = Basic(2, Basic(5, 3), 8)
    expected = set([Basic(0, Basic(0, 0), 0)])

    brl = canon(posdec)
    assert set(brl(expr)) == expected