Rename Vool to Sol
Simple is really the descriptive name for the layer Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified) Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else Just cause i was renaming anyway
This commit is contained in:
@ -1,51 +1,51 @@
|
||||
require_relative 'helper'
|
||||
|
||||
module Ruby
|
||||
class TestIfStatementVool < MiniTest::Test
|
||||
class TestIfStatementSol < MiniTest::Test
|
||||
include RubyTests
|
||||
|
||||
def setup
|
||||
@lst = compile("if(true) ; a = 1 ; else ; a = 2 ; end").to_vool
|
||||
@lst = compile("if(true) ; a = 1 ; else ; a = 2 ; end").to_sol
|
||||
end
|
||||
def test_class
|
||||
assert_equal Vool::IfStatement , @lst.class
|
||||
assert_equal Sol::IfStatement , @lst.class
|
||||
end
|
||||
def test_true
|
||||
assert_equal Vool::LocalAssignment , @lst.if_true.class
|
||||
assert_equal Sol::LocalAssignment , @lst.if_true.class
|
||||
assert @lst.has_true?
|
||||
end
|
||||
def test_false
|
||||
assert_equal Vool::LocalAssignment , @lst.if_false.class
|
||||
assert_equal Sol::LocalAssignment , @lst.if_false.class
|
||||
assert @lst.has_false?
|
||||
end
|
||||
def test_condition
|
||||
assert_equal Vool::TrueConstant , @lst.condition.class
|
||||
assert_equal Sol::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
|
||||
class TestIfStatementSolHoisted < MiniTest::Test
|
||||
include RubyTests
|
||||
|
||||
def setup
|
||||
@lst = compile("if(foo() == 1) ; a = 1 ; end").to_vool
|
||||
@lst = compile("if(foo() == 1) ; a = 1 ; end").to_sol
|
||||
end
|
||||
|
||||
def test_class
|
||||
assert_equal Vool::Statements , @lst.class
|
||||
assert_equal Sol::Statements , @lst.class
|
||||
end
|
||||
def test_first_class
|
||||
assert_equal Vool::LocalAssignment , @lst.first.class
|
||||
assert_equal Sol::LocalAssignment , @lst.first.class
|
||||
end
|
||||
def test_last_class
|
||||
assert_equal Vool::IfStatement , @lst.last.class
|
||||
assert_equal Sol::IfStatement , @lst.last.class
|
||||
end
|
||||
def test_true
|
||||
assert_equal Vool::LocalAssignment , @lst.last.if_true.class
|
||||
assert_equal Sol::LocalAssignment , @lst.last.if_true.class
|
||||
end
|
||||
def test_condition
|
||||
assert_equal Vool::SendStatement , @lst.last.condition.class
|
||||
assert_equal Sol::SendStatement , @lst.last.condition.class
|
||||
assert_equal :== , @lst.last.condition.name
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user