some cc driven cleanup
bit anoying that the builtin engine is used Even it is not as well configurable as preferred reek. Still, found one minor bug
This commit is contained in:
@ -39,7 +39,7 @@ module Ruby
|
||||
end
|
||||
def test_to_s
|
||||
lst = compile( double_if )
|
||||
assert_equal "if(false); true;else; false;end" , lst.to_s.gsub("\n",";")
|
||||
assert_tos "if(false);true;else;false;end" , lst
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -12,13 +12,18 @@ module Ruby
|
||||
end
|
||||
def test_true
|
||||
assert_equal Vool::LocalAssignment , @lst.if_true.class
|
||||
assert @lst.has_true?
|
||||
end
|
||||
def test_false
|
||||
assert_equal Vool::LocalAssignment , @lst.if_false.class
|
||||
assert @lst.has_false?
|
||||
end
|
||||
def test_condition
|
||||
assert_equal Vool::TrueConstant , @lst.condition.class
|
||||
end
|
||||
def test_to_s
|
||||
assert_tos "if (true);a = 1;else;a = 2;end" , @lst
|
||||
end
|
||||
end
|
||||
class TestIfStatementVoolHoisted < MiniTest::Test
|
||||
include RubyTests
|
||||
|
Reference in New Issue
Block a user