rubyx/test/risc/interpreter/class/test_class_inst.rb
Torsten Rüger a446d3da6b rename meta to singleton class
seems more appropriate, as it is the class for a single object
Also seems to be called that on the net (don't remember where the meta came from, but it's gone)
2019-09-24 12:59:22 +03:00

31 lines
589 B
Ruby

require_relative "../helper"
module Risc
class InterpreterGetters < MiniTest::Test
include Ticker
def setup
@preload = "Integer.div4"
@string_input = <<MAIN
class Space
def self.get
@inst = 5
return @inst
end
def main(arg)
return Space.get
end
end
MAIN
super
end
#Space type is wrong, shold be same as singleton_class.instance_type
def test_chain
#show_main_ticks # get output of what is
run_input @string_input
assert_equal 5 , get_return
end
end
end