Added new swig_gc.rb file to obtain easy stats
from ruby's GC. Updated newobject1_* tests to use it. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9695 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bbee2e374c
commit
fd79f15521
3 changed files with 47 additions and 8 deletions
|
|
@ -18,12 +18,18 @@
|
|||
#
|
||||
|
||||
require 'swig_assert'
|
||||
require 'swig_gc'
|
||||
require 'newobject1'
|
||||
|
||||
include Newobject1
|
||||
|
||||
|
||||
stats = nil
|
||||
stats = GC.stats(stats, Foo)
|
||||
100.times { foo1 = Foo.makeFoo; foo2 = foo1.makeMore }
|
||||
stats = GC.stats(stats, Foo)
|
||||
swig_assert( 'Foo.fooCount == 200', "but is #{Foo.fooCount}" )
|
||||
GC.start
|
||||
stats = GC.stats(stats, Foo)
|
||||
swig_assert( 'Foo.fooCount <= 2', "but is #{Foo.fooCount}" )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue