diff --git a/lib/register/instructions/register_transfer.rb b/lib/register/instructions/register_transfer.rb index 440b0fd7..f54f87f9 100644 --- a/lib/register/instructions/register_transfer.rb +++ b/lib/register/instructions/register_transfer.rb @@ -13,7 +13,7 @@ module Register class RegisterTransfer < Instruction # initialize with from and to registers. # First argument from - # second arguemnt to + # second argument to # # Note: this may be reversed from some assembler notations (also arm) def initialize source , from , to diff --git a/test/compiler/compiler_helper.rb b/test/compiler/compiler_helper.rb index b553f480..b3cbbcb6 100644 --- a/test/compiler/compiler_helper.rb +++ b/test/compiler/compiler_helper.rb @@ -4,11 +4,14 @@ require 'parslet/convenience' module CompilerHelper Phisol::Compiler.class_eval do - def set_main + def set_main main @clazz = Virtual.machine.space.get_class_by_name :Object - @method = Virtual.machine.space.get_main + @method = main end end + def set_main compiler + compiler.set_main Virtual.machine.space.get_main + end def check machine = Virtual.machine machine.boot unless machine.booted @@ -18,7 +21,7 @@ module CompilerHelper parts = Parser::Transform.new.apply(syntax) #puts parts.inspect compiler = Phisol::Compiler.new - compiler.set_main + set_main(compiler) produced = compiler.process( parts ) assert @output , "No output given" assert_equal produced.class, @output , "Wrong class" diff --git a/test/compiler/test_all.rb b/test/compiler/test_all.rb index d0b1bfcc..cfdd1543 100644 --- a/test/compiler/test_all.rb +++ b/test/compiler/test_all.rb @@ -1,3 +1,4 @@ require_relative "test_basic" +require_relative "test_call" require_relative "test_compiler" require_relative "test_field_access" diff --git a/test/elf/test_hello.rb b/test/elf/test_hello.rb index 109517e0..35f0adbf 100644 --- a/test/elf/test_hello.rb +++ b/test/elf/test_hello.rb @@ -1,4 +1,4 @@ -require_relative "compiler_helper" +require_relative "../helper" class HelloTest < MiniTest::Test