change return sequence to return messages to space

as it was before blocks
(thought blocks would make reuse of messages impossible, but was wrong, this only appilies to lambdas)
(too) many tests affected
This commit is contained in:
Torsten Ruger
2018-08-06 14:07:17 +03:00
parent 77cbc0ad6a
commit 393ac873c9
31 changed files with 193 additions and 399 deletions

View File

@ -34,19 +34,18 @@ module Risc
end
def test_sorted_positions1
sorted_objects = @text_writer.sorted_objects
sorted_objects.each_slice(2) do |l,r|
next unless r
next if l.is_a?(Label) or r.is_a?(Label)
assert Position.get(l).at < Position.get(r).at , "#{Position.get(l)} < #{Position.get(r)} , #{l.object_id.to_s(16)}, #{r.object_id.to_s(16)}"
end
check_positions(sorted_objects)
end
def test_sorted_positions2
sorted_objects = @text_writer.sorted_objects
sorted_objects.shift
sorted_objects.each_slice(2) do |l,r|
check_positions(sorted_objects)
end
def check_positions(objects)
objects.each_slice(2) do |l,r|
next unless r
next if l.is_a?(Label) or r.is_a?(Label)
assert Position.get(l).at < Position.get(r).at , "#{Position.get(l)} < #{Position.get(r)} , #{l.object_id.to_s(16)}, #{r.object_id.to_s(16)}"
#assert Position.get(l).at < Position.get(r).at , "#{Position.get(l)} < #{Position.get(r)} , #{l.object_id.to_s(16)}, #{r.object_id.to_s(16)}, #{l.class}, #{r.class}"
end
end
end