1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add test/win32ole/test_win32ole_variant.rb.

ext/win32ole/win32ole.c: use ANSI C style.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2006-04-30 13:11:12 +00:00
parent 09d313fa85
commit 2b5beeed15
3 changed files with 266 additions and 690 deletions

View file

@ -3,7 +3,6 @@ require 'win32ole'
puts "Now Test Win32OLE version #{WIN32OLE::VERSION}"
require "testWIN32OLE"
require "testVARIANT"
require "testOLEVARIANT"
require "testOLEEVENT"
require "testNIL2VTEMPTY"
require "testINVOKEVERB"

File diff suppressed because it is too large Load diff

View file

@ -66,6 +66,12 @@ class TestWIN32OLE_VARIANT < Test::Unit::TestCase
assert_equal("2004/12/24 12:24:45", obj.value)
end
def test_conversion_time2date
dt = Time.mktime(2004, 12, 24, 12, 24, 45)
obj = WIN32OLE_VARIANT.new(dt, WIN32OLE::VARIANT::VT_DATE)
assert_equal("2004/12/24 12:24:45", obj.value)
end
def test_conversion_str2cy
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
assert_equal("10000", obj.value)