Torsten Rüger
0725f02e9a
start at Object get_interna_word using the pattern to replace the whole risc method with a single mom instruction. Copying the original risc code into the instrucitons to_risc also adding some very basic tests
24 lines
541 B
Ruby
24 lines
541 B
Ruby
require_relative "helper"
|
|
|
|
module Risc
|
|
class TestBuiltinFunction < MiniTest::Test
|
|
|
|
def setup
|
|
Parfait.boot!(Parfait.default_test_options)
|
|
@functions = Builtin.boot_functions
|
|
end
|
|
def test_has_boot_function
|
|
assert @functions
|
|
end
|
|
def test_boot_function_type
|
|
assert_equal Array, @functions.class
|
|
end
|
|
def test_boot_function_length
|
|
assert_equal 2, @functions.length
|
|
end
|
|
def test_boot_function_first
|
|
assert_equal Mom::MethodCompiler, @functions.first.class
|
|
end
|
|
end
|
|
end
|