more auto guard rules

and related renaming of files
This commit is contained in:
Torsten Ruger 2016-12-16 01:14:09 +02:00
parent 516bbd10b7
commit 6f9955a726
7 changed files with 28 additions and 25 deletions

View File

@ -10,22 +10,9 @@ guard :minitest do
#Arm instructions
watch(%r{^lib/arm/instructions/(.+)_instruction.rb}) { |m| "test/arm/test_#{m[1]}.rb" }
# with Minitest::Spec
# watch(%r{^spec/(.*)_spec\.rb$})
# watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
# watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
#parfait basics
watch(%r{^lib/typed/parfait/(.+).rb}) { |m| "test/typed/parfait/test_#{m[1]}.rb" }
watch(%r{^lib/typed/parfait/type.rb}) { |m| "test/typed/type/test_all.rb" }
watch(%r{^lib/typed/parfait/typed_method.rb}) { |m| "test/typed/type/test_method_api.rb" }
# Rails 4
# watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
# watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
# watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
# watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
# watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
# watch(%r{^test/.+_test\.rb$})
# watch(%r{^test/test_helper\.rb$}) { 'test' }
# Rails < 4
# watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
# watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
# watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
end

View File

@ -15,7 +15,7 @@
module Parfait
TYPE_INDEX = 1
class Object
class Object
# we define new, so we can do memory layout also at compile time.
# At compile time we fake memory by using a global array for pages

View File

@ -1,10 +1,11 @@
require_relative "test_attributes"
require_relative "test_class"
require_relative "test_dictionary"
require_relative "test_frame"
require_relative "test_list"
require_relative "test_message"
require_relative "test_meta"
require_relative "test_method"
require_relative "test_meta_class"
require_relative "test_typed_method"
require_relative "test_object"
require_relative "test_space"
require_relative "test_word"

View File

@ -10,11 +10,7 @@ class TestAttributes < MiniTest::Test
def test_message_get_type
assert_equal Parfait::Type , @type.class
end
def test_message_type_first
@type.object_class = :next_message
assert_equal :type , @type.instance_names.first
assert_equal :next_message , @type.object_class
end
def test_message_name_nil
last = @type.instance_names.last
assert_equal :indexed_length , last , @type.instance_names.inspect

View File

@ -0,0 +1,19 @@
require_relative "../helper"
class TestFrames < MiniTest::Test
def setup
@frame = Register.machine.boot.space.first_message.frame
@type = @frame.get_type
end
def test_frame_get_type
assert_equal Parfait::Type , @type.class
end
def test_frame_next_set
@frame.next_frame = :next_frame
assert_equal :next_frame , @frame.next_frame
end
end