summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-23 11:14:03 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-23 11:14:03 +0000
commit32716144fdb3f83aa90cb0e6ab9207d63688fc9e (patch)
tree92dddd363bab1a96f1ff94ce667e10d9ea92f4e2 /test/win32ole
parent42850db14b21b4fa9e85f575fe3a2bce0ba1867e (diff)
* ext/win32ole/win32ole.c (reg_get_value): use RegQueryValueEx instead
of RegQueryValueEx. * ext/win32ole/win32ole.c (typelib_file_from_clsid): fix the bug that the function always returns Qnil. * test/win32ole/test_win32ole_type.rb (test_initialize): add some test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_win32ole_type.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole_type.rb b/test/win32ole/test_win32ole_type.rb
index 895cdb0..ce4d731 100644
--- a/test/win32ole/test_win32ole_type.rb
+++ b/test/win32ole/test_win32ole_type.rb
@@ -30,6 +30,31 @@ if defined?(WIN32OLE_TYPE)
}
ole_type = WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "Shell")
assert_instance_of(WIN32OLE_TYPE, ole_type)
+
+ ole_type2 = WIN32OLE_TYPE.new("{13709620-C279-11CE-A49E-444553540000}", "Shell")
+ assert_instance_of(WIN32OLE_TYPE, ole_type)
+ assert_equal(ole_type.name, ole_type2.name)
+ assert_equal(ole_type.ole_type, ole_type2.ole_type)
+ assert_equal(ole_type.guid, ole_type2.guid)
+ assert_equal(ole_type.progid, ole_type2.progid)
+ assert_equal(ole_type.name, ole_type2.name)
+ assert_equal(ole_type.ole_type, ole_type2.ole_type)
+ assert_equal(ole_type.guid, ole_type2.guid)
+ assert_equal(ole_type.progid, ole_type2.progid)
+ assert_equal(ole_type.visible?, ole_type2.visible?)
+ assert_equal(ole_type.to_s, ole_type2.to_s)
+ assert_equal(ole_type.major_version, ole_type2.major_version)
+ assert_equal(ole_type.minor_version, ole_type2.minor_version)
+ assert_equal(ole_type.typekind, ole_type2.typekind)
+ assert_equal(ole_type.helpstring, ole_type2.helpstring)
+ assert_equal(ole_type.src_type, ole_type2.src_type)
+ assert_equal(ole_type.helpfile, ole_type2.helpfile)
+ assert_equal(ole_type.helpcontext, ole_type2.helpcontext)
+ assert_equal(ole_type.variables.size, ole_type2.variables.size)
+ assert_equal(ole_type.ole_methods[0].name, ole_type2.ole_methods[0].name)
+ assert_equal(ole_type.ole_typelib.name, ole_type2.ole_typelib.name)
+ assert_equal(ole_type.implemented_ole_types.size, ole_type2.implemented_ole_types.size)
+ assert_equal(ole_type.inspect, ole_type2.inspect)
end
def setup