~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to test/win32ole/test_win32ole_type.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
      }
31
31
      ole_type = WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "Shell")
32
32
      assert_instance_of(WIN32OLE_TYPE, ole_type)
 
33
 
 
34
      ole_type2 = WIN32OLE_TYPE.new("{13709620-C279-11CE-A49E-444553540000}", "Shell")
 
35
      assert_instance_of(WIN32OLE_TYPE, ole_type)
 
36
      assert_equal(ole_type.name, ole_type2.name)
 
37
      assert_equal(ole_type.ole_type, ole_type2.ole_type)
 
38
      assert_equal(ole_type.guid, ole_type2.guid)
 
39
      assert_equal(ole_type.progid, ole_type2.progid)
 
40
      assert_equal(ole_type.visible?, ole_type2.visible?)
 
41
      assert_equal(ole_type.to_s, ole_type2.to_s)
 
42
      assert_equal(ole_type.major_version, ole_type2.major_version)
 
43
      assert_equal(ole_type.minor_version, ole_type2.minor_version)
 
44
      assert_equal(ole_type.typekind, ole_type2.typekind)
 
45
      assert_equal(ole_type.helpstring, ole_type2.helpstring)
 
46
      assert_equal(ole_type.src_type, ole_type2.src_type)
 
47
      assert_equal(ole_type.helpfile, ole_type2.helpfile)
 
48
      assert_equal(ole_type.helpcontext, ole_type2.helpcontext)
 
49
      assert_equal(ole_type.variables.size, ole_type2.variables.size)
 
50
      assert_equal(ole_type.ole_methods[0].name, ole_type2.ole_methods[0].name)
 
51
      assert_equal(ole_type.ole_typelib.name, ole_type2.ole_typelib.name)
 
52
      assert_equal(ole_type.implemented_ole_types.size, ole_type2.implemented_ole_types.size)
 
53
      assert_equal(ole_type.inspect, ole_type2.inspect)
33
54
    end
34
55
 
35
56
    def setup
131
152
      ole_types = @ole_type.implemented_ole_types
132
153
      assert_instance_of(Array, ole_types)
133
154
      assert(ole_types.size > 0)
134
 
      assert_equal("IShellDispatch", ole_types[0].name)
 
155
      assert_match(/^IShellDispatch5{0,1}$/, ole_types[0].name)
135
156
    end
136
157
 
137
158
    def test_inspect