Skip to content

Commit

Permalink
fix up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Oct 9, 2009
1 parent a9e46f0 commit 2a58ab5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
12 changes: 0 additions & 12 deletions test/test_concretize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ def go a

assert B.public_instance_methods.grep(/go/).length == 1# it should be public...I think

class C
def go a
33
end
end


class DD
def go a, b
34
Expand All @@ -77,11 +70,6 @@ def go a, b

DD.new.go 3, 4 # shouldn't raise :)

assert C.instance_method(:go).arity == 1
assert String.instance_method(:to_c_strlit).arity == 0
puts 'cified these', Concretize.concretize_all!.inspect
assert C.instance_method(:go).arity == -1
assert String.instance_method(:to_c_strlit).arity == -1

# test some ancestry shtuff

Expand Down
16 changes: 16 additions & 0 deletions test/test_concretize_all.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require File.dirname(__FILE__) + '/test_bootstrap'
require 'assert2'

class C
def go a
33
end
end

include Ruby2CExtension

assert C.instance_method(:go).arity == 1
assert String.instance_method(:to_c_strlit).arity == 0
puts 'cified these', Concretize.concretize_all!.inspect
assert C.instance_method(:go).arity == -1
assert String.instance_method(:to_c_strlit).arity == -1 # this one should have been concretized, too

0 comments on commit 2a58ab5

Please sign in to comment.