fix many tests with preloading
preloading, something akin to builtin, loads some very small predefined (macro) methods for the tests to work (ie call)
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Parfait
|
||||
class TestMethods < ParfaitTest
|
||||
def setup
|
||||
super
|
||||
Mom.boot!
|
||||
end
|
||||
def test_integer
|
||||
int = Parfait.object_space.get_class_by_name :Integer
|
||||
assert_equal 13, int.instance_type.method_names.get_length
|
||||
end
|
||||
def test_methods_booted
|
||||
word = @space.get_type_by_class_name(:Word)
|
||||
assert_equal 3 , word.method_names.get_length
|
||||
assert word.get_method(:putstring) , "no putstring"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
@@ -14,7 +14,7 @@ module Parfait
|
||||
end
|
||||
def foo_method( for_class = :Try)
|
||||
args = Parfait::Type.for_hash( @try_class , { bar: :Integer})
|
||||
::Parfait::CallableMethod.new( :foo ,@space.get_type_by_class_name(for_class) , args,empty_frame)
|
||||
CallableMethod.new( :foo ,@space.get_type_by_class_name(for_class) , args,empty_frame)
|
||||
end
|
||||
def add_foo_to( clazz = :Try )
|
||||
foo = foo_method( clazz )
|
||||
|
Reference in New Issue
Block a user