Move builtin wholesale to Mom
Since Builtin generates risc, just like mom instructions, it was a design mistake to put builtin into risc in the first place. Now that borders are coming more into focus, it make much more sense to have the builtin in mom. In fact the instructions should be moved out and a seperate invocation mechanism used , so functions can be parsed, not generated (wip)
This commit is contained in:
23
test/mom/test_builtin.rb
Normal file
23
test/mom/test_builtin.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Mom
|
||||
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 22, @functions.length
|
||||
end
|
||||
def test_boot_function_first
|
||||
assert_equal Mom::MethodCompiler, @functions.first.class
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user