update gems and fix tests

This commit is contained in:
Torsten Ruger 2016-12-06 12:08:18 +02:00
parent 4b05b48197
commit 5ac14ddccc
17 changed files with 52 additions and 79 deletions

View File

@ -1,7 +1,7 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "salama" , :path => "." gem "salama" , :path => "."
gem "ast" , :github => "whitequark/ast" gem "ast" #, :github => "whitequark/ast"
gem "rake" gem "rake"
gem "rye" gem "rye"

View File

@ -1,12 +1,12 @@
GIT GIT
remote: git://github.com/salama/salama-arm.git remote: git://github.com/salama/salama-arm.git
revision: 00beb3703b57702e6d8d4743abf7eac2504a3c83 revision: 866ae7ad961f1a387bfb75526fa170006005b13f
specs: specs:
salama-arm (0.3.0) salama-arm (0.5.0)
GIT GIT
remote: git://github.com/salama/salama-object-file.git remote: git://github.com/salama/salama-object-file.git
revision: f2aad98ff93a816aca7b47bea0751974a72b1e72 revision: aab01b23108f10063433b1ef9f703ff2927d0b80
specs: specs:
salama-object-file (0.3.0) salama-object-file (0.3.0)
@ -18,12 +18,6 @@ GIT
ast (~> 2.1.0) ast (~> 2.1.0)
parslet (~> 1.7.1) parslet (~> 1.7.1)
GIT
remote: git://github.com/whitequark/ast.git
revision: 63db4686b33228e8f703cb7328e5e5c62aa3cd92
specs:
ast (2.1.0)
PATH PATH
remote: . remote: .
specs: specs:
@ -37,18 +31,19 @@ GEM
specs: specs:
annoy (0.5.6) annoy (0.5.6)
highline (>= 1.5.0) highline (>= 1.5.0)
ast (2.1.0)
blankslate (3.1.3) blankslate (3.1.3)
codeclimate-test-reporter (0.4.8) codeclimate-test-reporter (1.0.3)
simplecov (>= 0.7.1, < 1.0.0) simplecov
coderay (1.1.0) coderay (1.1.1)
docile (1.1.5) docile (1.1.5)
drydock (0.6.9) drydock (0.6.9)
ffi (1.9.10) ffi (1.9.14)
ffi (1.9.10-x64-mingw32) ffi (1.9.14-x64-mingw32)
formatador (0.2.5) formatador (0.2.5)
guard (2.13.0) guard (2.14.0)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0) listen (>= 2.7, < 4.0)
lumberjack (~> 1.0) lumberjack (~> 1.0)
nenv (~> 0.1) nenv (~> 0.1)
notiffany (~> 0.0) notiffany (~> 0.0)
@ -56,41 +51,38 @@ GEM
shellany (~> 0.0) shellany (~> 0.0)
thor (>= 0.18.1) thor (>= 0.18.1)
guard-compat (1.2.1) guard-compat (1.2.1)
guard-minitest (2.4.4) guard-minitest (2.4.6)
guard-compat (~> 1.2) guard-compat (~> 1.2)
minitest (>= 3.0) minitest (>= 3.0)
highline (1.7.8) highline (1.7.8)
json (1.8.3) json (2.0.2)
listen (3.0.3) listen (3.1.5)
rb-fsevent (>= 0.9.3) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (>= 0.9) rb-inotify (~> 0.9, >= 0.9.7)
lumberjack (1.0.9) ruby_dep (~> 1.2)
lumberjack (1.0.10)
method_source (0.8.2) method_source (0.8.2)
minitest (5.8.1) minitest (5.10.1)
nenv (0.2.0) nenv (0.3.0)
net-scp (1.2.1) net-scp (1.2.1)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (3.0.1) net-ssh (3.2.0)
notiffany (0.0.8) notiffany (0.1.1)
nenv (~> 0.1) nenv (~> 0.1)
shellany (~> 0.0) shellany (~> 0.0)
parser (2.2.3.0) parser (2.2.3.0)
ast (>= 1.1, < 3.0) ast (>= 1.1, < 3.0)
parslet (1.7.1) parslet (1.7.1)
blankslate (>= 2.0, <= 4.0) blankslate (>= 2.0, <= 4.0)
pry (0.10.2) pry (0.10.4)
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.8.1) method_source (~> 0.8.1)
slop (~> 3.4) slop (~> 3.4)
pry (0.10.2-x64-mingw32)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
win32console (~> 1.3)
rake (11.3.0) rake (11.3.0)
rb-fsevent (0.9.6) rb-fsevent (0.9.8)
rb-inotify (0.9.5) rb-inotify (0.9.7)
ffi (>= 0.5.0) ffi (>= 0.5.0)
ruby_dep (1.5.0)
rye (0.9.13) rye (0.9.13)
annoy annoy
docile (>= 1.0.1) docile (>= 1.0.1)
@ -99,9 +91,9 @@ GEM
net-ssh (>= 2.0.13) net-ssh (>= 2.0.13)
sysinfo (>= 0.8.1) sysinfo (>= 0.8.1)
shellany (0.0.1) shellany (0.0.1)
simplecov (0.10.0) simplecov (0.12.0)
docile (~> 1.1.0) docile (~> 1.1.0)
json (~> 1.8) json (>= 1.8, < 3)
simplecov-html (~> 0.10.0) simplecov-html (~> 0.10.0)
simplecov-html (0.10.0) simplecov-html (0.10.0)
slop (3.6.0) slop (3.6.0)
@ -109,15 +101,14 @@ GEM
sysinfo (0.8.1) sysinfo (0.8.1)
drydock drydock
storable storable
thor (0.19.1) thor (0.19.4)
win32console (1.3.2)
PLATFORMS PLATFORMS
ruby ruby
x64-mingw32 x64-mingw32
DEPENDENCIES DEPENDENCIES
ast! ast
codeclimate-test-reporter codeclimate-test-reporter
guard guard
guard-minitest guard-minitest
@ -130,4 +121,4 @@ DEPENDENCIES
soml-parser! soml-parser!
BUNDLED WITH BUNDLED WITH
1.12.5 1.13.5

View File

@ -1,20 +1,6 @@
# A sample Guardfile # A sample Guardfile
# More info at https://github.com/guard/guard#readme # More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
guard :minitest do guard :minitest do
# with Minitest::Unit # with Minitest::Unit
watch(%r{^test/(.*)\/?test_(.*)\.rb$}) watch(%r{^test/(.*)\/?test_(.*)\.rb$})

View File

@ -54,7 +54,6 @@ module Register
space_dict = object_with_type Parfait::Dictionary space_dict = object_with_type Parfait::Dictionary
space_dict.keys = object_with_type Parfait::List space_dict.keys = object_with_type Parfait::List
space_dict.values = object_with_type Parfait::List space_dict.values = object_with_type Parfait::List
@space = object_with_type Parfait::Space @space = object_with_type Parfait::Space
@space.classes = space_dict @space.classes = space_dict
Parfait::Space.set_object_space @space Parfait::Space.set_object_space @space

View File

@ -38,7 +38,6 @@ module Parfait
end end
end end
@@object_space = nil
# Make the object space globally available # Make the object space globally available
def self.object_space def self.object_space
@@object_space @@object_space

View File

@ -17,8 +17,8 @@ require "minitest/autorun"
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $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 'salama' was = require 'salama'
puts "loaded #{was}"
class Ignored class Ignored
def == other def == other

View File

@ -1 +1,2 @@
require_relative "../helper" require_relative "../helper"
Register.machine.boot unless Register.machine.booted

View File

@ -18,7 +18,7 @@ class TestAttributes < MiniTest::Test
def test_message_name_nil def test_message_name_nil
last = @type.instance_names.last last = @type.instance_names.last
assert_equal :indexed_length , last assert_equal :indexed_length , last
assert_equal nil , @mess.name assert_nil @mess.name
end end
def test_message_next_set def test_message_next_set
@mess.next_message = :next_message @mess.next_message = :next_message

View File

@ -50,9 +50,9 @@ class TestClass < MiniTest::Test
assert_equal Parfait::Method , @try.get_instance_method(:foo).class assert_equal Parfait::Method , @try.get_instance_method(:foo).class
end end
def test_method_get_nothere def test_method_get_nothere
assert_equal nil , @try.get_instance_method(:foo) assert_nil @try.get_instance_method(:foo)
test_remove_method test_remove_method
assert_equal nil , @try.get_instance_method(:foo) assert_nil @try.get_instance_method(:foo)
end end
def test_resolve def test_resolve
foo = foo_method :Object foo = foo_method :Object

View File

@ -1,7 +1,6 @@
require_relative "../helper" require_relative "../helper"
class TestDictionary < MiniTest::Test class TestDictionary < MiniTest::Test
Register.machine.boot #have to book, otherwise types etc not set
def setup def setup
@lookup = ::Parfait::Dictionary.new @lookup = ::Parfait::Dictionary.new
@ -10,8 +9,8 @@ class TestDictionary < MiniTest::Test
assert @lookup.empty? assert @lookup.empty?
end end
def test_empty_dict_doesnt_return def test_empty_dict_doesnt_return
assert_equal nil , @lookup.get(3) assert_nil @lookup.get(3)
assert_equal nil , @lookup.get(:any) assert_nil @lookup.get(:any)
end end
def test_one_set1 def test_one_set1
assert_equal 1 , @lookup.set(1,1) assert_equal 1 , @lookup.set(1,1)

View File

@ -3,7 +3,6 @@ require_relative "../helper"
class TestList < MiniTest::Test class TestList < MiniTest::Test
def setup def setup
Register.machine.boot unless Register.machine.booted
@list = ::Parfait::List.new @list = ::Parfait::List.new
end end
def test_isa def test_isa
@ -35,7 +34,7 @@ class TestList < MiniTest::Test
def test_length0 def test_length0
assert_equal 0 , @list.get_length assert_equal 0 , @list.get_length
assert_equal nil , @list.indexed_length assert_nil @list.indexed_length
end end
def test_offset def test_offset
assert_equal 2 , @list.get_offset assert_equal 2 , @list.get_offset
@ -67,7 +66,7 @@ class TestList < MiniTest::Test
assert_equal 0 , @list.get_length assert_equal 0 , @list.get_length
end end
def test_empty_list_doesnt_return def test_empty_list_doesnt_return
assert_equal nil , @list.get(3) assert_nil @list.get(3)
end end
def test_one_set1 def test_one_set1
assert_equal 2 , @list.set(1,2) assert_equal 2 , @list.set(1,2)
@ -122,7 +121,7 @@ class TestList < MiniTest::Test
test_many_get test_many_get
assert_equal 2 , @list.index_of( :two ) assert_equal 2 , @list.index_of( :two )
assert_equal 3 , @list.index_of( :three ) assert_equal 3 , @list.index_of( :three )
assert_equal nil , @list.index_of( :four ) assert_nil @list.index_of( :four )
end end
def test_inspect def test_inspect
test_many_get test_many_get
@ -146,13 +145,13 @@ class TestList < MiniTest::Test
assert_equal :one , @list.first assert_equal :one , @list.first
end end
def test_first_empty def test_first_empty
assert_equal nil , @list.first assert_nil @list.first
end end
def test_last def test_last
test_many_get test_many_get
assert_equal :three , @list.last assert_equal :three , @list.last
end end
def test_last_empty def test_last_empty
assert_equal nil , @list.last assert_nil @list.last
end end
end end

View File

@ -47,8 +47,8 @@ class TestMeta < MiniTest::Test
assert_equal Parfait::Method , @try.get_instance_method(:foo).class assert_equal Parfait::Method , @try.get_instance_method(:foo).class
end end
def test_method_get_nothere def test_method_get_nothere
assert_equal nil , @try.get_instance_method(:foo) assert_nil @try.get_instance_method(:foo)
test_remove_method test_remove_method
assert_equal nil , @try.get_instance_method(:foo) assert_nil @try.get_instance_method(:foo)
end end
end end

View File

@ -3,7 +3,7 @@ require_relative "../helper"
class TestMethod < MiniTest::Test class TestMethod < MiniTest::Test
def setup def setup
obj = Register.machine.boot.space.get_class_by_name(:Object) obj = Register.machine.space.get_class_by_name(:Object)
args = Parfait.new_list [ Parfait::Variable.new(:Integer , :bar )] args = Parfait.new_list [ Parfait::Variable.new(:Integer , :bar )]
@method = ::Parfait::Method.new obj , :foo , args @method = ::Parfait::Method.new obj , :foo , args
end end

View File

@ -14,7 +14,7 @@ class TestObject < MiniTest::Test
end end
def test_empty_object_doesnt_return def test_empty_object_doesnt_return
assert_equal nil , @object.get_internal_word(3) assert_nil @object.get_internal_word(3)
end end
def test_one_set1 def test_one_set1

View File

@ -3,7 +3,7 @@ require_relative "../helper"
class TestSpace < MiniTest::Test class TestSpace < MiniTest::Test
def setup def setup
@machine = Register.machine.boot @machine = Register.machine
end end
def classes def classes
[:Kernel,:Word,:List,:Message,:Frame,:Type,:Object,:Class,:Dictionary,:Method , :Integer] [:Kernel,:Word,:List,:Message,:Frame,:Type,:Object,:Class,:Dictionary,:Method , :Integer]

View File

@ -3,7 +3,6 @@ require_relative "../helper"
class TestEmptyWord < MiniTest::Test class TestEmptyWord < MiniTest::Test
def setup def setup
Register.machine.boot unless Register.machine.booted
@word = ::Parfait::Word.new(0) @word = ::Parfait::Word.new(0)
end end
def test_word_create def test_word_create

View File

@ -42,12 +42,12 @@ module Register
assert_equal @label, @instruction.last assert_equal @label, @instruction.last
end end
def test_next1 def test_next1
assert_equal nil , @instruction.next assert_nil @instruction.next
end end
def test_next2 def test_next2
@instruction.set_next @label @instruction.set_next @label
assert_equal @label , @instruction.next assert_equal @label , @instruction.next
assert_equal nil , @instruction.next(2) assert_nil @instruction.next(2)
end end
def test_replace def test_replace
@instruction.append @branch @instruction.append @branch