rubyx/test/risc/position/test_code_position.rb
Torsten Rüger 5dc8c046e7 increase binary_code size to 32
save a few jump, adds some size to binary
16 just seemed kind of small
2019-08-22 12:26:40 +03:00

25 lines
742 B
Ruby

require_relative "helper"
module Risc
class TestPositionTranslated < MiniTest::Test
def setup
Parfait.boot!(Parfait.default_test_options)
Risc.boot!
@binary = Parfait::BinaryCode.new(1)
@method = Parfait.object_space.types.values.first.methods
@label = Risc.label("hi","ho")
end
def test_bin_propagates_existing
@binary.extend_to(32)
CodeListener.init( @binary , :interpreter).set(0)
assert_equal @binary.padded_length , Position.get(@binary.next_code).at
end
def test_bin_propagates_after
CodeListener.init( @binary , :interpreter).set(0)
@binary.extend_to(32)
assert_equal @binary.padded_length , Position.get(@binary.next_code).at
end
end
end