* test/win32ole/test_win32ole_event.rb: test_s_new_exception is
executed on standard Windows OS without ADO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
38b1f5c1cc
commit
03a6d033af
@ -1,3 +1,8 @@
|
||||
Sun Dec 21 10:51:51 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* test/win32ole/test_win32ole_event.rb: test_s_new_exception is
|
||||
executed on standard Windows OS without ADO.
|
||||
|
||||
Sun Dec 21 08:35:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (jemalloc): fix option argument, should use
|
||||
|
@ -21,8 +21,38 @@ def ado_installed?
|
||||
installed
|
||||
end
|
||||
|
||||
def swbemsink_avairable?
|
||||
available = false
|
||||
if defined?(WIN32OLE)
|
||||
wmi = nil
|
||||
begin
|
||||
wmi = WIN32OLE.new('WbemScripting.SWbemSink')
|
||||
available = true
|
||||
rescue
|
||||
end
|
||||
end
|
||||
available
|
||||
end
|
||||
|
||||
if defined?(WIN32OLE_EVENT)
|
||||
class TestWIN32OLE_EVENT < Test::Unit::TestCase
|
||||
def test_s_new_exception
|
||||
assert_raise(TypeError) {
|
||||
WIN32OLE_EVENT.new("A")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
class TestWIN32OLE_EVENT_SWbemSink < Test::Unit::TestCase
|
||||
unless swbemsink_avairable?
|
||||
def test_dummy_for_skip_message
|
||||
skip "'WbemScripting.SWbemSink' is not available"
|
||||
end
|
||||
else
|
||||
end
|
||||
end
|
||||
|
||||
class TestWIN32OLE_EVENT_ADO < Test::Unit::TestCase
|
||||
unless ado_installed?
|
||||
def test_dummy_for_skip_message
|
||||
skip "ActiveX Data Object Library not found"
|
||||
@ -50,12 +80,6 @@ if defined?(WIN32OLE_EVENT)
|
||||
@event3 = ""
|
||||
end
|
||||
|
||||
def test_s_new
|
||||
assert_raise(TypeError) {
|
||||
WIN32OLE_EVENT.new("A")
|
||||
}
|
||||
end
|
||||
|
||||
def test_s_new_without_itf
|
||||
ev = WIN32OLE_EVENT.new(@db)
|
||||
ev.on_event {|*args| default_handler(*args)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user