add another test (still failing)

This commit is contained in:
Torsten Ruger 2016-12-30 13:15:08 +02:00
parent 523302ebe2
commit 631038dfbd
3 changed files with 21 additions and 8 deletions

View File

@ -20,9 +20,9 @@ module Elf
assembler = Register::Assembler.new(Register.machine) assembler = Register::Assembler.new(Register.machine)
set_text assembler.write_as_string set_text assembler.write_as_string
# for debug add labels to the block positions # for debug add labels for labels
Register.machine.space.types.values.each do |clazz| Register.machine.space.types.values.each do |type|
clazz.instance_methods.each do |f| type.instance_methods.each do |f|
f.instructions.each_label do |label| f.instructions.each_label do |label|
add_symbol "#{clazz.name}::#{f.name}:#{label.name}" , label.position add_symbol "#{clazz.name}::#{f.name}:#{label.name}" , label.position
end end

View File

@ -1 +1,2 @@
require_relative "test_hello" require_relative "test_hello"
require_relative "test_zero"

12
test/elf/test_zero.rb Normal file
View File

@ -0,0 +1,12 @@
require_relative "../helper"
class TestZeroCode < MiniTest::Test
def test_string_put
machine = Register.machine.boot
machine.collect
machine.translate_arm
# writer = Elf::ObjectWriter.new
# writer.save "test/zero.o"
end
end