зеркало из https://github.com/github/ruby.git
* test/win32ole/test_win32ole_typelib.rb: add some illegal argument test.
* test/win32ole/test_win32ole_type.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. * test/win32ole/test_win32ole_param.rb: ditto. * test/win32ole/test_win32ole_method.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
86714f5b16
Коммит
4f1b06aabd
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Thu Jul 10 21:15:49 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* test/win32ole/test_win32ole_typelib.rb: add some illegal argument
|
||||
test.
|
||||
|
||||
* test/win32ole/test_win32ole_type.rb: ditto.
|
||||
|
||||
* test/win32ole/test_win32ole_event.rb: ditto.
|
||||
|
||||
* test/win32ole/test_win32ole_param.rb: ditto.
|
||||
|
||||
* test/win32ole/test_win32ole_method.rb: ditto.
|
||||
|
||||
Thu Jul 10 19:38:35 2008 wanabe <s.wanabe@gmail.com>
|
||||
* test/ruby/envutil.rb (assert_normal_exit): r17993 revert.
|
||||
|
||||
|
|
|
@ -30,6 +30,12 @@ if defined?(WIN32OLE_EVENT)
|
|||
@event += event
|
||||
end
|
||||
|
||||
def test_s_new
|
||||
assert_raise(TypeError) {
|
||||
ev = WIN32OLE_EVENT.new("A")
|
||||
}
|
||||
end
|
||||
|
||||
def test_s_new_without_itf
|
||||
ev = WIN32OLE_EVENT.new(@ie)
|
||||
ev.on_event {|*args| default_handler(*args)}
|
||||
|
|
|
@ -33,6 +33,9 @@ if defined?(WIN32OLE_METHOD)
|
|||
assert_raise(WIN32OLERuntimeError) {
|
||||
method = WIN32OLE_METHOD.new(ole_type, "NonExistMethod")
|
||||
}
|
||||
assert_raise(TypeError) {
|
||||
method = WIN32OLE_METHOD.new(ole_type, 1)
|
||||
}
|
||||
method = WIN32OLE_METHOD.new(ole_type, "Open")
|
||||
assert_instance_of(WIN32OLE_METHOD, method)
|
||||
method = WIN32OLE_METHOD.new(ole_type, "open")
|
||||
|
|
|
@ -29,6 +29,13 @@ if defined?(WIN32OLE_PARAM)
|
|||
@param_overwritefiles = m_copyfile.params[2]
|
||||
end
|
||||
|
||||
def test_s_new
|
||||
assert_raise(ArgumentError) {
|
||||
WIN32OLE_PARAM.new("hoge")
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def test_name
|
||||
assert_equal('URL', @param_url.name)
|
||||
assert_equal('Flags', @param_flags.name)
|
||||
|
|
|
@ -22,6 +22,12 @@ if defined?(WIN32OLE_TYPE)
|
|||
assert_raise(ArgumentError) {
|
||||
WIN32OLE_TYPE.new("foo")
|
||||
}
|
||||
assert_raise(TypeError) {
|
||||
WIN32OLE_TYPE.new(1, 2)
|
||||
}
|
||||
assert_raise(TypeError) {
|
||||
WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", 1)
|
||||
}
|
||||
assert_raise(WIN32OLERuntimeError) {
|
||||
WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "foo")
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@ if defined?(WIN32OLE_TYPELIB)
|
|||
assert_raise(ArgumentError) {
|
||||
WIN32OLE_TYPELIB.new(1,2,3,4)
|
||||
}
|
||||
|
||||
assert_raise(TypeError) {
|
||||
WIN32OLE_TYPELIB.new(100)
|
||||
}
|
||||
|
||||
tlib = WIN32OLE_TYPELIB.new("Microsoft Shell Controls And Automation")
|
||||
assert_instance_of(WIN32OLE_TYPELIB, tlib)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче