testing for arrays in all the wrong places

This commit is contained in:
Torsten Ruger 2017-09-07 08:17:13 +03:00
parent b5ca886069
commit 9189e56e77
7 changed files with 22 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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