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