示例#1
0
def test_operation_length_of_CALL_with_register():
    assert operation_length(CALL(Token.R(12), Token.R(13))) == 1
示例#2
0
def test_operation_lentgh_of_FLAGS():
    assert operation_length(FLAGS(Token.R(3))) == 2
示例#3
0
def test_operation_length_of_CALL_with_label():
    assert operation_length(CALL(Token.R(12), Token.Sym("l"))) == 3
示例#4
0
def test_operation_length_of_NEG():
    assert operation_length(NEG(Token.R(7), Token.R(15))) == 2
示例#5
0
def test_operation_length_of_NOT():
    assert operation_length(NOT(Token.R(5), Token.R(7))) == 3
示例#6
0
def test_operation_length_of_CMP():
    assert operation_length(CMP(Token.R(1), Token.R(0))) == 2
示例#7
0
def test_operation_length_of_MOVE():
    assert operation_length(MOVE(Token.R(1), Token.R(2))) == 1
示例#8
0
def test_operation_length_of_SETRF():
    assert operation_length(SETRF(Token.R(1), Token.Int(10))) == 4
示例#9
0
def test_operation_length_of_register_branch_with_register():
    assert operation_length(BNZ(Token.R(1))) == 1
示例#10
0
def test_operation_length_of_register_branch_with_label():
    assert operation_length(BNZ(Token.Sym("l"))) == 3