From 9189e56e7753bf3cff955e5e066590b6d4eb0af9 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 7 Sep 2017 08:17:13 +0300 Subject: [PATCH] testing for arrays in all the wrong places --- test/vool/to_mom/send/test_send_simple.rb | 3 +++ test/vool/to_mom/send/test_send_simple_string.rb | 3 +++ test/vool/to_mom/test_if_simple.rb | 3 +++ test/vool/to_mom/test_ivar.rb | 3 +++ test/vool/to_mom/test_local.rb | 3 +++ test/vool/to_mom/test_return.rb | 3 +++ test/vool/to_mom/test_while_simple.rb | 5 ++++- 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/test/vool/to_mom/send/test_send_simple.rb b/test/vool/to_mom/send/test_send_simple.rb index ca9137ba..0676ee8b 100644 --- a/test/vool/to_mom/send/test_send_simple.rb +++ b/test/vool/to_mom/send/test_send_simple.rb @@ -9,6 +9,9 @@ module Vool @stats = compile_first_method( "5.mod4").first end + def test_compiles_not_array + assert Array != @stats.class , @stats + end def test_class_compiles assert_equal Mom::SlotConstant , @stats.first.class , @stats end diff --git a/test/vool/to_mom/send/test_send_simple_string.rb b/test/vool/to_mom/send/test_send_simple_string.rb index 4d72fe6c..df54e6d3 100644 --- a/test/vool/to_mom/send/test_send_simple_string.rb +++ b/test/vool/to_mom/send/test_send_simple_string.rb @@ -9,6 +9,9 @@ module Vool @stats = compile_first_method( "'5'.get_internal_byte(1)").first end + def test_compiles_not_array + assert Array != @stats.class , @stats + end def test_class_compiles assert_equal Mom::SlotConstant , @stats.first.class , @stats end diff --git a/test/vool/to_mom/test_if_simple.rb b/test/vool/to_mom/test_if_simple.rb index 2c40de7e..3f78635e 100644 --- a/test/vool/to_mom/test_if_simple.rb +++ b/test/vool/to_mom/test_if_simple.rb @@ -11,6 +11,9 @@ module Vool @first = @stats.first end + def test_compiles_not_array + assert Array != @stats.class , @stats + end def test_if_compiles_as_array assert_equal Mom::IfStatement , @first.class , @stats end diff --git a/test/vool/to_mom/test_ivar.rb b/test/vool/to_mom/test_ivar.rb index c365989b..ae099b2a 100644 --- a/test/vool/to_mom/test_ivar.rb +++ b/test/vool/to_mom/test_ivar.rb @@ -9,6 +9,9 @@ module Vool @method = compile_first_method( "@a = 5") end + def test_compiles_not_array + assert Array != @stats.class , @stats + end def test_class_compiles assert_equal Mom::SlotConstant , @method.first.class , @method end diff --git a/test/vool/to_mom/test_local.rb b/test/vool/to_mom/test_local.rb index ebcf0e6e..8e4da0d5 100644 --- a/test/vool/to_mom/test_local.rb +++ b/test/vool/to_mom/test_local.rb @@ -10,6 +10,9 @@ module Vool @first = @stats.first end + def test_compiles_not_array + assert Array != @stats.class , @stats + end def test_class_compiles assert_equal Mom::SlotConstant , @first.class , @stats end diff --git a/test/vool/to_mom/test_return.rb b/test/vool/to_mom/test_return.rb index 6da63f43..998b4f23 100644 --- a/test/vool/to_mom/test_return.rb +++ b/test/vool/to_mom/test_return.rb @@ -9,6 +9,9 @@ module Vool @stats = compile_first_method( "return 5").first end + def test_compiles_not_array + assert Array != @stats.class , @stats + end def test_class_compiles assert_equal Mom::SlotConstant , @stats.first.class , @stats end diff --git a/test/vool/to_mom/test_while_simple.rb b/test/vool/to_mom/test_while_simple.rb index cba7ec86..7c23b0bb 100644 --- a/test/vool/to_mom/test_while_simple.rb +++ b/test/vool/to_mom/test_while_simple.rb @@ -11,7 +11,10 @@ module Vool @first = @stats.first end - def test_if_compiles_as_array + def test_compiles_not_array + assert Array != @stats.class , @stats + end + def test_compiles_as_while assert_equal Mom::WhileStatement , @first.class , @stats end def test_condition_compiles_to_check