2017-04-12 20:18:41 +03:00
|
|
|
require_relative "helper"
|
|
|
|
|
2018-07-19 14:46:51 +03:00
|
|
|
module Ruby
|
2019-10-04 00:36:49 +03:00
|
|
|
class TestSolCallMulti2 < MiniTest::Test
|
2018-06-29 22:46:39 +03:00
|
|
|
include RubyTests
|
2017-04-12 20:18:41 +03:00
|
|
|
|
2019-08-16 18:42:57 +03:00
|
|
|
include RubyTests
|
|
|
|
def setup
|
2019-10-04 00:36:49 +03:00
|
|
|
@lst = compile( "@foo = a.call(b)").to_sol
|
2017-09-10 13:04:36 +03:00
|
|
|
end
|
2019-08-16 20:39:08 +03:00
|
|
|
def test_class
|
2019-10-04 00:36:49 +03:00
|
|
|
assert_equal Sol::Statements , @lst.class
|
2019-08-16 20:39:08 +03:00
|
|
|
end
|
|
|
|
def test_first_class
|
2019-10-04 00:36:49 +03:00
|
|
|
assert_equal Sol::LocalAssignment , @lst[0].class
|
2019-08-16 20:39:08 +03:00
|
|
|
end
|
|
|
|
def test_first_name
|
|
|
|
assert @lst[0].name.to_s.start_with?("tmp_")
|
|
|
|
end
|
|
|
|
def test_second_class
|
2019-10-04 00:36:49 +03:00
|
|
|
assert_equal Sol::LocalAssignment , @lst[1].class
|
2019-08-16 20:39:08 +03:00
|
|
|
end
|
|
|
|
def test_second_name
|
|
|
|
assert @lst[1].name.to_s.start_with?("tmp_")
|
|
|
|
end
|
|
|
|
def test_last_class
|
2019-10-04 00:36:49 +03:00
|
|
|
assert_equal Sol::IvarAssignment , @lst[2].class
|
2019-08-16 20:39:08 +03:00
|
|
|
end
|
|
|
|
def test_second_name
|
|
|
|
assert_equal :foo, @lst[2].name
|
2018-03-18 22:38:00 +05:30
|
|
|
end
|
2017-04-12 20:18:41 +03:00
|
|
|
end
|
|
|
|
end
|