From 26fe77ed68ac4333abaee497b5a840f3184dc482 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 26 Apr 2018 12:33:33 +0300 Subject: [PATCH] add some multi method tests --- test/risc/methods/helper.rb | 8 +++++++ test/risc/methods/test_call_cond.rb | 32 +++++++++++++++++++++++++++ test/risc/methods/test_call_fibo.rb | 26 ++++++++++++++++++++++ test/risc/methods/test_call_simple.rb | 19 ++++++++++++++++ test/support/risc_interpreter.rb | 9 +++++++- 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 test/risc/methods/helper.rb create mode 100644 test/risc/methods/test_call_cond.rb create mode 100644 test/risc/methods/test_call_fibo.rb create mode 100644 test/risc/methods/test_call_simple.rb diff --git a/test/risc/methods/helper.rb b/test/risc/methods/helper.rb new file mode 100644 index 00000000..918f88d4 --- /dev/null +++ b/test/risc/methods/helper.rb @@ -0,0 +1,8 @@ +require_relative '../helper' + +module Methods + class MethodsTest < MiniTest::Test + include Risc::Ticker + def setup;end + end +end diff --git a/test/risc/methods/test_call_cond.rb b/test/risc/methods/test_call_cond.rb new file mode 100644 index 00000000..cd18c3cb --- /dev/null +++ b/test/risc/methods/test_call_cond.rb @@ -0,0 +1,32 @@ +require_relative 'helper' + +module Methods + class TestCallCond < MethodsTest + + def if_cond( arg ) + str = <