2015-07-19 09:54:36 +02:00
|
|
|
require_relative "compiler_helper"
|
2014-07-31 20:38:01 +02:00
|
|
|
|
2015-07-19 09:54:36 +02:00
|
|
|
class TestMachine < MiniTest::Test
|
|
|
|
include CompilerHelper
|
2015-05-05 14:11:09 +02:00
|
|
|
|
2014-07-31 20:38:01 +02:00
|
|
|
def test_object
|
|
|
|
@string_input = <<HERE
|
|
|
|
class Object
|
2014-08-06 17:49:20 +02:00
|
|
|
def get_class()
|
|
|
|
@layout.get_class()
|
|
|
|
end
|
2014-07-31 20:38:01 +02:00
|
|
|
end
|
|
|
|
HERE
|
2015-05-16 19:16:49 +02:00
|
|
|
@output = nil
|
2014-07-31 20:38:01 +02:00
|
|
|
check
|
|
|
|
end
|
|
|
|
|
2014-08-07 14:41:13 +02:00
|
|
|
def test_message_tpye
|
|
|
|
@string_input = <<HERE
|
|
|
|
class Message
|
|
|
|
def get_type_for(name)
|
|
|
|
index = @layout.get_index(name)
|
|
|
|
get_at(index)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
HERE
|
2014-08-13 10:59:51 +02:00
|
|
|
@output = ""
|
2014-08-07 14:41:13 +02:00
|
|
|
check
|
|
|
|
end
|
|
|
|
|
2015-05-05 14:11:09 +02:00
|
|
|
end
|