fix naming mistakes fo Word.get/set macros
This commit is contained in:
parent
d125a1528a
commit
5c13ea1433
@ -41,8 +41,10 @@ module Sol
|
|||||||
"Integer.ls" => "def <<; X.int_operator(:<<);end",
|
"Integer.ls" => "def <<; X.int_operator(:<<);end",
|
||||||
"Integer.rs" => "def >>; X.int_operator(:>>);end",
|
"Integer.rs" => "def >>; X.int_operator(:>>);end",
|
||||||
"Word.put" => "def putstring(at); X.putstring;end",
|
"Word.put" => "def putstring(at); X.putstring;end",
|
||||||
"Word.set" => "def set_internal_byte(at, val); X.set_internal_byte;end",
|
"Word.set" => "def set_internal_word(at, val); X.set_internal_word;end",
|
||||||
"Word.get" => "def get_internal_byte(at); X.get_internal_byte;end",
|
"Word.get" => "def get_internal_word(at); X.get_internal_word;end",
|
||||||
|
"Word.set_byte" => "def set_internal_byte(at, val); X.set_internal_byte;end",
|
||||||
|
"Word.get_byte" => "def get_internal_byte(at); X.get_internal_byte;end",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
def self.builtin_code
|
def self.builtin_code
|
||||||
|
@ -5,7 +5,7 @@ module SlotMachine
|
|||||||
class TestWordGetRisc < BootTest
|
class TestWordGetRisc < BootTest
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@method = get_compiler("Word",:get)
|
@method = get_compiler("Word",:get_byte)
|
||||||
end
|
end
|
||||||
def test_slot_length
|
def test_slot_length
|
||||||
assert_equal :get_internal_byte , @method.callable.name
|
assert_equal :get_internal_byte , @method.callable.name
|
||||||
|
@ -2,10 +2,10 @@ require_relative "helper"
|
|||||||
|
|
||||||
module SlotMachine
|
module SlotMachine
|
||||||
module Builtin
|
module Builtin
|
||||||
class TestWordSetRisc < BootTest
|
class TestSetInternalByte < BootTest
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@method = get_compiler("Word",:set)
|
@method = get_compiler("Word",:set_byte)
|
||||||
end
|
end
|
||||||
def test_slot_length
|
def test_slot_length
|
||||||
assert_equal :set_internal_byte , @method.callable.name
|
assert_equal :set_internal_byte , @method.callable.name
|
||||||
|
@ -2,12 +2,12 @@ require_relative "helper"
|
|||||||
|
|
||||||
module SlotMachine
|
module SlotMachine
|
||||||
module Builtin
|
module Builtin
|
||||||
class TestWordSetRisc < BootTest
|
class TestSetInternalWord < BootTest
|
||||||
def setup
|
def setup
|
||||||
@method = get_compiler("Word",:set)
|
@method = get_compiler("Word",:set)
|
||||||
end
|
end
|
||||||
def test_slot_length
|
def test_slot_length
|
||||||
assert_equal :set_internal_byte , @method.callable.name
|
assert_equal :set_internal_word , @method.callable.name
|
||||||
assert_equal 7 , @method.slot_instructions.length
|
assert_equal 7 , @method.slot_instructions.length
|
||||||
end
|
end
|
||||||
def test_compile
|
def test_compile
|
||||||
|
Loading…
Reference in New Issue
Block a user