improved requires

This commit is contained in:
Torsten Ruger 2014-04-23 13:57:34 +03:00
parent 69c1f8fccc
commit 7d1be1f908
6 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,3 @@
require 'asm/arm_assembler'
require 'asm/instruction' require 'asm/instruction'
require 'asm/nodes' require 'asm/nodes'
require 'stream_reader' require 'stream_reader'

View File

@ -0,0 +1,2 @@
require "asm/arm_assembler"
require "elf/object_writer"

View File

@ -3,7 +3,7 @@ require 'elf/symbol_table_section'
require 'elf/text_section' require 'elf/text_section'
require 'elf/string_table_section' require 'elf/string_table_section'
module Asm module Elf
class ObjectWriter class ObjectWriter
def initialize(target) def initialize(target)

View File

@ -29,5 +29,3 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'test')) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'test'))
require 'crystal' require 'crystal'
require 'asm/object_writer'
require "asm/arm_assembler"

View File

@ -40,7 +40,7 @@ class TestSmallProg < MiniTest::Test
#helper to write the file #helper to write the file
def write len ,name def write len ,name
writer = Asm::ObjectWriter.new(Elf::Constants::TARGET_ARM) writer = Elf::ObjectWriter.new(Elf::Constants::TARGET_ARM)
assembly = @generator.assemble_to_string assembly = @generator.assemble_to_string
assert_equal len * 4 , assembly.length assert_equal len * 4 , assembly.length
writer.set_text assembly writer.set_text assembly

View File

@ -1,5 +1,4 @@
require_relative 'helper' require_relative 'helper'
require "asm/arm_assembler"
# try to test that the generation of basic instructions works # try to test that the generation of basic instructions works
# one instruction at a time, reverse testing from objdump --demangle -Sfghxp # one instruction at a time, reverse testing from objdump --demangle -Sfghxp