rubyx/stash/parfait/helper.rb

29 lines
545 B
Ruby
Raw Normal View History

require_relative '../helper'
# Parfait test test just that, parfait.
#
# The idea is to have really really small main programs that test one very small thing
# AND return an exit code (or write stdout) that can be checked by
# compiling and running the thing remotely
#
module ParfaitTests
include RuntimeTests
def setup
@stdout = ""
@machine = Risc.machine.boot
2017-01-14 18:28:44 +01:00
Vm::Compiler.load_parfait
end
def main
runko = <<HERE
2015-11-30 15:09:12 +01:00
class Space < Object
int main()
PROGRAM
end
end
HERE
runko.sub("PROGRAM" , @main )
end
end