us the actual classes for expected results
If i remember strings were only used to shorten the names Now in register module this is not neccessary
This commit is contained in:
parent
9d36d72ee5
commit
3f24409093
@ -9,8 +9,8 @@ module Register
|
|||||||
Register.machine.boot
|
Register.machine.boot
|
||||||
do_clean_compile
|
do_clean_compile
|
||||||
Typed.compile( @input )
|
Typed.compile( @input )
|
||||||
Register::Collector.collect_space
|
Collector.collect_space
|
||||||
@interpreter = Register::Interpreter.new
|
@interpreter = Interpreter.new
|
||||||
@interpreter.start Register.machine.init
|
@interpreter.start Register.machine.init
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ module Register
|
|||||||
def check_chain should
|
def check_chain should
|
||||||
should.each_with_index do |name , index|
|
should.each_with_index do |name , index|
|
||||||
got = ticks(1)
|
got = ticks(1)
|
||||||
assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}"
|
assert_equal got.class ,name , "Wrong class for #{index+1}, expect #{name} , got #{got}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -54,11 +54,11 @@ module Register
|
|||||||
puts e
|
puts e
|
||||||
puts e.backtrace
|
puts e.backtrace
|
||||||
end
|
end
|
||||||
classes = classes.collect {|c| '"' + c.name.sub("Register::","") + '",' }
|
str = classes.to_s.gsub("Register::","")
|
||||||
classes << "length = #{classes.length}"
|
str.split(",").each_slice(5).each do |line|
|
||||||
classes.each_slice(5).each do |line|
|
puts " " + line.join(",") + ","
|
||||||
puts " " + line.join
|
|
||||||
end
|
end
|
||||||
|
puts "length = #{classes.length}"
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user