2018-08-11 18:17:20 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
|
|
|
module Parfait
|
|
|
|
class TestMethods < ParfaitTest
|
|
|
|
def setup
|
|
|
|
super
|
2019-08-12 23:13:29 +02:00
|
|
|
Mom.boot!
|
2018-08-11 18:17:20 +02:00
|
|
|
end
|
|
|
|
def test_integer
|
|
|
|
int = Parfait.object_space.get_class_by_name :Integer
|
2019-08-12 23:13:29 +02:00
|
|
|
assert_equal 13, int.instance_type.method_names.get_length
|
2018-08-11 18:17:20 +02:00
|
|
|
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
|