Change Mom to SlotMachine
rather large commit, but essentially a simple rename Rationale in docs and blogs
This commit is contained in:
@ -2,7 +2,7 @@ require_relative "helper"
|
||||
|
||||
module Vool
|
||||
class TestClassInstance < MiniTest::Test
|
||||
include Mom
|
||||
include SlotMachine
|
||||
include VoolCompile
|
||||
|
||||
def class_main
|
||||
@ -19,10 +19,10 @@ module Vool
|
||||
end
|
||||
|
||||
def setup
|
||||
ret = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_mom(class_main)
|
||||
ret = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_slot(class_main)
|
||||
@compiler = ret.compilers.find_compiler_name(:some_inst)
|
||||
@main = ret.compilers.find_compiler_name(:main)
|
||||
@ins = @compiler.mom_instructions.next
|
||||
@ins = @compiler.slot_instructions.next
|
||||
end
|
||||
def test_class_inst
|
||||
space_class = Parfait.object_space.get_class
|
||||
@ -31,7 +31,7 @@ module Vool
|
||||
assert names.index_of(:inst) , names
|
||||
end
|
||||
def test_compiler
|
||||
assert_equal Mom::MethodCompiler, @compiler.class
|
||||
assert_equal SlotMachine::MethodCompiler, @compiler.class
|
||||
assert_equal Parfait::Type, @compiler.callable.self_type.class
|
||||
assert_equal 6, @compiler.callable.self_type.names.index_of(:inst) , @compiler.callable.self_type.names
|
||||
end
|
||||
@ -40,10 +40,10 @@ module Vool
|
||||
end
|
||||
def test_main_array
|
||||
check_array [MessageSetup, ArgumentTransfer, SimpleCall, SlotLoad, ReturnJump ,
|
||||
Label, ReturnSequence, Label] , @main.mom_instructions.next
|
||||
Label, ReturnSequence, Label] , @main.slot_instructions.next
|
||||
end
|
||||
def test_main_args
|
||||
args = @main.mom_instructions.next(2)
|
||||
args = @main.slot_instructions.next(2)
|
||||
assert_equal Parfait::Class , args.receiver.known_object.class
|
||||
assert_equal :Space , args.receiver.known_object.name
|
||||
assert_equal :some_inst , args.receiver.known_object.type.method_names.first
|
||||
|
Reference in New Issue
Block a user