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