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