summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-18 13:40:41 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-18 13:40:41 +0000
commitd89c7635285b5d0e84400577eedb53349c798f86 (patch)
tree7326bdac60084a073fd363fd982a275bdee63b56 /test/win32ole
parentd738e3e15533e0f500789faaedcef9ed9ca362b9 (diff)
* ext/win32ole/win32ole.c (folevariant_initialize): WIN32OLE_VARIANT
does not support VT_RECORD. VT_RECORD should be supported in WIN32OLE_RECORD. * test/win32ole/test_win32ole_variant.rb (test_s_new_vt_record_exc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_win32ole_variant.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole_variant.rb b/test/win32ole/test_win32ole_variant.rb
index 73bcd75..91e3c0d 100644
--- a/test/win32ole/test_win32ole_variant.rb
+++ b/test/win32ole/test_win32ole_variant.rb
@@ -309,6 +309,13 @@ if defined?(WIN32OLE_VARIANT)
assert_equal(ar, ar2.value)
end
+ def test_s_new_vt_record_exc
+ # VT_RECORD (= 36) should not be allowed in WIN32OLE_VARIANT#new
+ assert_raise(ArgumentError) {
+ WIN32OLE_VARIANT.new(nil, 36)
+ }
+ end
+
def test_s_array
obj = WIN32OLE_VARIANT.array([2,3], WIN32OLE::VARIANT::VT_I4)
assert_instance_of(WIN32OLE_VARIANT, obj)