rubyx/test/soml/parfait/helper.rb
Torsten Ruger 7daaec6a0a unify fragment and parfait test code
so that we can test fragments remotely too
2015-11-18 13:04:57 +02:00

29 lines
543 B
Ruby

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 = Register.machine.boot
Soml::Compiler.load_parfait
end
def main
runko = <<HERE
class Object
int main()
PROGRAM
end
end
HERE
runko.sub("PROGRAM" , @main )
end
end