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