manage to create ruby methods
This commit is contained in:
@ -6,12 +6,15 @@ module Melon
|
||||
module MelonTests
|
||||
|
||||
def setup
|
||||
@parser = Parser::Ruby22
|
||||
Register.machine.boot
|
||||
end
|
||||
|
||||
def check
|
||||
assert true
|
||||
#puts @parser.parse @string_input
|
||||
Compiler.compile @string_input
|
||||
Register::Collector.collect_space
|
||||
@interpreter = Register::Interpreter.new
|
||||
@interpreter.start Register.machine.init
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -3,3 +3,8 @@ require_relative "test_calls"
|
||||
require_relative "test_hello"
|
||||
require_relative "test_itos"
|
||||
require_relative "test_loop"
|
||||
|
||||
require_relative "test_many_adds"
|
||||
require_relative "test_many_hello"
|
||||
require_relative "test_many_calls"
|
||||
require_relative "test_many_itos"
|
||||
|
@ -6,11 +6,9 @@ module Melon
|
||||
|
||||
|
||||
def test_ruby_hello
|
||||
@string_input = <<HERE
|
||||
puts "Hello there"
|
||||
HERE
|
||||
@stdout = "Hello there"
|
||||
check
|
||||
@string_input = 'puts "Hello there"'
|
||||
assert !check
|
||||
# assert_equal "Hello there" , @interpreter.stdout
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user