From 3ca351ec2397e85b989017500361df1f5b88afa7 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 1 Apr 2006 09:21:27 +0000 Subject: [PATCH] remove testOLEMETHOD.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/tests/testOLEMETHOD.rb | 92 ----------------------------- ext/win32ole/tests/testall.rb | 1 - 2 files changed, 93 deletions(-) delete mode 100644 ext/win32ole/tests/testOLEMETHOD.rb diff --git a/ext/win32ole/tests/testOLEMETHOD.rb b/ext/win32ole/tests/testOLEMETHOD.rb deleted file mode 100644 index 390c9999f8..0000000000 --- a/ext/win32ole/tests/testOLEMETHOD.rb +++ /dev/null @@ -1,92 +0,0 @@ -# You need RubyUnit and MS Excel and MSI to run this test script - -require 'rubyunit' - -require 'win32ole' -require 'oleserver' - -class TestOLEMETHOD < RUNIT::TestCase - include OLESERVER - def setup - @excel_app = WIN32OLE_TYPE.new(MS_EXCEL_TYPELIB, 'Application') - end - def test_s_new - m = WIN32OLE_METHOD.new(@excel_app, 'Quit') - assert_instance_of(WIN32OLE_METHOD, m) - m = WIN32OLE_METHOD.new(@excel_app, 'WorkbookOpen') - assert_instance_of(WIN32OLE_METHOD, m) - m = WIN32OLE_METHOD.new(@excel_app, 'workbookopen') - assert_instance_of(WIN32OLE_METHOD, m) - end - def test_name - m = WIN32OLE_METHOD.new(@excel_app, 'Quit') - assert_equal('Quit', m.name) - end - def test_to_s - m = WIN32OLE_METHOD.new(@excel_app, 'Quit') - assert_equal('Quit', "#{m}") - end - def test_return_type - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert_equal('Range', m.return_type) - m = WIN32OLE_METHOD.new(@excel_app, 'ActivePrinter') - assert_equal('BSTR', m.return_type) - end - def test_return_vtype - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert_equal(WIN32OLE::VARIANT::VT_PTR, m.return_vtype) - m = WIN32OLE_METHOD.new(@excel_app, 'ActivePrinter') - assert_equal(WIN32OLE::VARIANT::VT_BSTR, m.return_vtype) - end - def test_return_type_detail - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert_equal(['PTR', 'USERDEFINED', 'Range'], m.return_type_detail) - m = WIN32OLE_METHOD.new(@excel_app, 'ActivePrinter') - assert_equal(['BSTR'], m.return_type_detail) - end - - def test_invoke_kind - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert_equal('PROPERTYGET', m.invoke_kind) - end - def test_visible - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert(m.visible?) - m = WIN32OLE_METHOD.new(@excel_app, 'AddRef') - assert(!m.visible?) - end - def test_event - m = WIN32OLE_METHOD.new(@excel_app, 'WorkbookOpen') - assert(m.event?) - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert(!m.event?) - end - def test_event_interface - m = WIN32OLE_METHOD.new(@excel_app, 'WorkbookOpen') - assert_equal('AppEvents', m.event_interface) - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert_nil(m.event_interface) - end - def test_helpstring - domdoc = WIN32OLE_TYPE.new(MS_XML_TYPELIB, 'DOMDocument') - m = WIN32OLE_METHOD.new(domdoc, 'abort') - assert_equal('abort an asynchronous download', m.helpstring) - end - def test_helpfile - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert_match(/VBAXL.*\.(HLP|CHM)$/i, m.helpfile) - end - def test_helpcontext - m = WIN32OLE_METHOD.new(@excel_app, 'ActiveCell') - assert(m.helpcontext > 0) - end - def test_offset_vtbl - m = WIN32OLE_METHOD.new(@excel_app, 'QueryInterface') - assert_equal(0, m.offset_vtbl) - end - def test_dispid - tobj = WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation', 'FolderItem2') - method = WIN32OLE_METHOD.new(tobj, 'InvokeVerb') - assert_equal(1610743824, method.dispid) - end -end diff --git a/ext/win32ole/tests/testall.rb b/ext/win32ole/tests/testall.rb index 727cb992e0..7343c784bb 100644 --- a/ext/win32ole/tests/testall.rb +++ b/ext/win32ole/tests/testall.rb @@ -3,7 +3,6 @@ require 'win32ole' puts "Now Test Win32OLE version #{WIN32OLE::VERSION}" require "testWIN32OLE" require "testOLEPARAM" -require "testOLEMETHOD" require "testVARIANT" require "testOLEVARIANT" require "testOLEEVENT"