fix naming mistakes fo Word.get/set macros

This commit is contained in:
Torsten 2020-03-12 17:54:39 +02:00
parent d125a1528a
commit 5c13ea1433
4 changed files with 9 additions and 7 deletions

View File

@ -41,8 +41,10 @@ module Sol
"Integer.ls" => "def <<; X.int_operator(:<<);end",
"Integer.rs" => "def >>; X.int_operator(:>>);end",
"Word.put" => "def putstring(at); X.putstring;end",
"Word.set" => "def set_internal_byte(at, val); X.set_internal_byte;end",
"Word.get" => "def get_internal_byte(at); X.get_internal_byte;end",
"Word.set" => "def set_internal_word(at, val); X.set_internal_word;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
def self.builtin_code

View File

@ -5,7 +5,7 @@ module SlotMachine
class TestWordGetRisc < BootTest
def setup
super
@method = get_compiler("Word",:get)
@method = get_compiler("Word",:get_byte)
end
def test_slot_length
assert_equal :get_internal_byte , @method.callable.name

View File

@ -2,10 +2,10 @@ require_relative "helper"
module SlotMachine
module Builtin
class TestWordSetRisc < BootTest
class TestSetInternalByte < BootTest
def setup
super
@method = get_compiler("Word",:set)
@method = get_compiler("Word",:set_byte)
end
def test_slot_length
assert_equal :set_internal_byte , @method.callable.name

View File

@ -2,12 +2,12 @@ require_relative "helper"
module SlotMachine
module Builtin
class TestWordSetRisc < BootTest
class TestSetInternalWord < BootTest
def setup
@method = get_compiler("Word",:set)
end
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
end
def test_compile