diff options
author | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-06 12:38:49 +0000 |
---|---|---|
committer | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-06 12:38:49 +0000 |
commit | 696e6a9b7655c5dd32c4468c105e2a471f712cd6 (patch) | |
tree | dbd4b5fc2e27c72c4bf12028dd22f4032892fc71 /test/win32ole/test_win32ole.rb | |
parent | 0ca8c28e4d250e90e368a62fd2cc5edb2098cb90 (diff) | |
download | ruby-696e6a9b7655c5dd32c4468c105e2a471f712cd6.tar.gz |
* ext/win32ole/win32ole.c (fole_s_connect, fole_initialize,
folevariant_initialize): check argument type of WIN32OLE.connect,
WIN32OLE.new, WIN32OLE_VARIANT.new.
* test/win32ole/test_win32ole.rb (test_s_new_exc, test_s_connect_exc):
ditto.
* test/win32ole/test_win32ole_variant.rb (test_s_new_exc): ditto.
* test/win32ole/test_win32ole_method.rb: add assertion of
WIN32OLE_METHOD.new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole/test_win32ole.rb')
-rw-r--r-- | test/win32ole/test_win32ole.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb index 983c47929e..b946aa6ff0 100644 --- a/test/win32ole/test_win32ole.rb +++ b/test/win32ole/test_win32ole.rb @@ -153,6 +153,15 @@ if defined?(WIN32OLE) assert_instance_of(WIN32OLE, @dict2) end + def test_s_new_exc + assert_raise(TypeError) { + WIN32OLE.new(1) + } + assert_raise(TypeError) { + WIN32OLE.new("Scripting.Dictionary", 1) + } + end + def test_s_new_DCOM rshell = WIN32OLE.new("Shell.Application") assert_instance_of(WIN32OLE, rshell) @@ -172,6 +181,12 @@ if defined?(WIN32OLE) assert_instance_of(WIN32OLE, obj) end + def test_s_connect_exc + assert_raise(TypeError) { + WIN32OLE.connect(1) + } + end + def test_invoke_accept_symbol_hash_key fso = WIN32OLE.new('Scripting.FileSystemObject') afolder = fso.getFolder(".") |