reuse dished out names
so they become like variables
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
require_relative "../helper"
|
||||
|
||||
module Risc
|
||||
class TestBuilderBoot #< MiniTest::Test
|
||||
class TestBuilderBoot < MiniTest::Test
|
||||
|
||||
def setup
|
||||
Risc.machine.boot
|
||||
@ -35,6 +35,11 @@ module Risc
|
||||
assert_equal SlotToReg , built.class
|
||||
assert_equal :r1 , built.array.symbol
|
||||
end
|
||||
def test_reuses_names
|
||||
r1 = RiscValue.new(:r1 , :Space)
|
||||
built = @builder.build{ space << r1 ; space << r1}
|
||||
assert_equal built.to.symbol , built.next.to.symbol
|
||||
end
|
||||
end
|
||||
|
||||
class TestBuilderNoBoot < MiniTest::Test
|
||||
|
Reference in New Issue
Block a user