From 45bfe118d15dd7b3ea5d417789424d39bf46b190 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 12 Mar 2018 18:16:23 +0530 Subject: [PATCH] simple mom test for simple call --- test/mom/test_dynamic_call_statement.rb | 2 +- test/mom/test_simple_call_statement.rb | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/mom/test_simple_call_statement.rb diff --git a/test/mom/test_dynamic_call_statement.rb b/test/mom/test_dynamic_call_statement.rb index f92db4b3..7d9736f1 100644 --- a/test/mom/test_dynamic_call_statement.rb +++ b/test/mom/test_dynamic_call_statement.rb @@ -1,7 +1,7 @@ require_relative "helper" module Mom - class TestCall < MiniTest::Test + class TestDynamicCall < MiniTest::Test include MomCompile def setup diff --git a/test/mom/test_simple_call_statement.rb b/test/mom/test_simple_call_statement.rb new file mode 100644 index 00000000..3a9bf830 --- /dev/null +++ b/test/mom/test_simple_call_statement.rb @@ -0,0 +1,23 @@ +require_relative "helper" + +module Mom + class TestSimpleCall < MiniTest::Test + include MomCompile + + def setup + Risc.machine.boot + @stats = compile_first_method_flat( "5.mod4") + @first = @stats.next + end + + def test_if_compiles + assert_equal @stats.last.class , SimpleCall , @stats + end + def test_length + assert_equal 3 , @stats.length + end + def test_array + check_array [MessageSetup,ArgumentTransfer,SimpleCall] , @stats + end + end +end