rubyx/test/bench/ruby/helper.rb
Torsten Ruger 1e2b784583 moved all the ruby benches out of the tests
here into bench dir and a little frame
2015-11-21 16:33:43 +02:00

32 lines
465 B
Ruby

require_relative '../../soml/helper'
# Benchmarks for the stuff in results.md
module BenchTests
include RuntimeTests
ENV["REMOTE_PI"] = "pi" unless ENV.has_key?("REMOTE_PI")
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
def check_remote val
check_r val , true
end
end