put arm tests in arm module

This commit is contained in:
Torsten Ruger 2017-01-03 22:37:55 +02:00
parent a14a0de9d1
commit da58ce30e3
7 changed files with 307 additions and 293 deletions

View File

@ -4,6 +4,7 @@ require_relative "../helper"
# one instruction at a time, reverse testing from objdump --demangle -Sfghxp
# tests are named as per assembler code, ie test_mov testing mov instruction
module Arm
module ArmHelper
def setup
@machine = Arm::ArmMachine
@ -24,3 +25,4 @@ module ArmHelper
end
end
end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper'
module Arm
class TestControl < MiniTest::Test
include ArmHelper
@ -24,3 +25,4 @@ class TestControl < MiniTest::Test
end
end
end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper'
module Arm
class TestArmAsm < MiniTest::Test
include ArmHelper
@ -28,3 +29,4 @@ class TestArmAsm < MiniTest::Test
assert_code code , :tst , [0x02,0x00,0x12,0xe1] #e1 12 00 02
end
end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper'
module Arm
class TestLogic < MiniTest::Test
include ArmHelper
@ -92,3 +93,4 @@ class TestLogic < MiniTest::Test
end
end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper'
module Arm
class TestMemory < MiniTest::Test
include ArmHelper
@ -72,3 +73,4 @@ class TestMemory < MiniTest::Test
assert_code code, :strb , [0x03,0x10,0xc2,0xe7] #e7 c2 10 03
end
end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper'
module Arm
class TestMoves < MiniTest::Test
include ArmHelper
@ -60,3 +61,4 @@ class TestMoves < MiniTest::Test
end
end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper'
module Arm
class TestStack < MiniTest::Test
include ArmHelper
@ -29,3 +30,4 @@ class TestStack < MiniTest::Test
end
end
end