[Win32utils-devel] win32-mmap test suite
win32utils-devel at rubyforge.org
win32utils-devel at rubyforge.org
Mon Mar 8 22:36:14 EST 2004
I just tried running tc_mmap.rb and noticed that something rather curious
seems to happen. The call to Mmap.new in setup seems to cause the test
suite to just exit without ever actually running the tests.
I reduced the test suite to just this bit of code. This works, although the
final test (TypeError) does not pass - no exception in thrown.
This is 1.8.1 on Win2k.
Any ideas?
Dan
PS - I added the VERSION constant to mmap.c :)
if File.basename(Dir.pwd) == "test"
require "ftools"
Dir.chdir ".."
Dir.mkdir("win32") unless File.exists?("win32")
File.copy("mmap.so","win32")
$:.unshift Dir.pwd
end
require "test/unit"
require "win32/mmap"
include Win32
class TC_Mmap < Test::Unit::TestCase
def setup
@a = 1
end
def test_version
assert_equal("0.0.1",Mmap::VERSION,"Bad version")
end
def test_new
assert_nothing_raised{ Mmap.new("Foo") }
assert_nothing_raised{ Mmap.new("Foo",16*1024) }
assert_nothing_raised{ Mmap.new("Foo",16*1024,"test") }
assert_raises(ArgumentError){
Mmap.new("Foo",16*1024,"test",true,true,10,true) }
assert_raises(TypeError){ Mmap.new("Foo",1) }
end
end
_________________________________________________________________
Get business advice and resources to improve your work life, from bCentral.
http://special.msn.com/bcentral/loudclear.armx
More information about the win32utils-devel
mailing list