From 14f0a0d0bd25b02ced6d43c6335ecc9bf68fe605 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 30 Jul 2005 09:51:48 +0000 Subject: add WIN32OLE_TYPE#ole_typelib, WIN32OLE_TYPE#implemented_ole_types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/tests/testOLETYPE.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ext/win32ole/tests') diff --git a/ext/win32ole/tests/testOLETYPE.rb b/ext/win32ole/tests/testOLETYPE.rb index d4eb1146e1..510691484f 100644 --- a/ext/win32ole/tests/testOLETYPE.rb +++ b/ext/win32ole/tests/testOLETYPE.rb @@ -93,4 +93,19 @@ class TestOLETYPE < RUNIT::TestCase type = WIN32OLE_TYPE.new(MS_EXCEL_TYPELIB, 'Application') assert_equal("Application", "#{type}"); end + def test_ole_typelib + type = WIN32OLE_TYPE.new(MS_EXCEL_TYPELIB, 'Application') + tlib = type.ole_typelib + assert_instance_of(WIN32OLE_TYPELIB, tlib); + assert_equal(MS_EXCEL_TYPELIB, tlib.name); + end + + def test_implemented_ole_types + type = WIN32OLE_TYPE.new(MS_EXCEL_TYPELIB, 'Application') + impltypes = type.implemented_ole_types + assert_instance_of(Array, impltypes); + assert_equal('_Application', impltypes[0].name) + assert_equal('AppEvents', impltypes[1].name) + end + end -- cgit v1.2.3