[前][次][番号順一覧][スレッド一覧]

ruby-changes:37457

From: suke <ko1@a...>
Date: Sat, 7 Feb 2015 22:17:37 +0900 (JST)
Subject: [ruby-changes:37457] suke:r49538 (trunk): * test/win32ole/test_win32ole_record.rb: remove test using .NET

suke	2015-02-07 22:17:22 +0900 (Sat, 07 Feb 2015)

  New Revision: 49538

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49538

  Log:
    * test/win32ole/test_win32ole_record.rb: remove test using .NET
      Framework 3.5 because it is not included in Windows 8/8.1.

  Modified files:
    trunk/ChangeLog
    trunk/test/win32ole/test_win32ole_record.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49537)
+++ ChangeLog	(revision 49538)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb  7 22:13:08 2015  Masaki Suketa <masaki.suketa@n...>
+
+	* test/win32ole/test_win32ole_record.rb: remove test using .NET
+	  Framework 3.5 because it is not included in Windows 8/8.1.
+
 Sat Feb  7 19:25:25 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* dir.c (has_magic): always get long path name on Windows even if
Index: test/win32ole/test_win32ole_record.rb
===================================================================
--- test/win32ole/test_win32ole_record.rb	(revision 49537)
+++ test/win32ole/test_win32ole_record.rb	(revision 49538)
@@ -6,7 +6,6 @@ rescue LoadError https://github.com/ruby/ruby/blob/trunk/test/win32ole/test_win32ole_record.rb#L6
 end
 require 'test/unit'
 
-PROGID_CLR='System.Runtime.Serialization.FormatterConverter'
 PROGID_RBCOMTEST='RbComTest.ComSrvTest'
 
 =begin
@@ -210,105 +209,4 @@ if defined?(WIN32OLE_RECORD) https://github.com/ruby/ruby/blob/trunk/test/win32ole/test_win32ole_record.rb#L209
     end
   end
 
-  def clr_exist?
-    exist = false
-    begin
-      obj = WIN32OLE.new(PROGID_CLR)
-      exist = true
-    rescue WIN32OLERuntimeError
-      exist = false
-    end
-    exist
-  end
-
-  class TestWIN32OLE_CLR < Test::Unit::TestCase
-    unless clr_exist?
-      def test_dummy_for_skip_message
-        skip "#{PROGID_CLR}(.Net Framework 3.5) not found."
-      end
-    else
-      def setup
-        @obj = WIN32OLE.new(PROGID_CLR)
-      end
-
-      def test_s_new_from_win32ole
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        assert(rec)
-        assert_instance_of(WIN32OLE_RECORD, rec)
-      end
-
-      def test_s_new_from_win32ole_typelib
-        tlib = @obj.ole_typelib
-        rec = WIN32OLE_RECORD.new('Decimal', tlib)
-        assert(rec)
-        assert_instance_of(WIN32OLE_RECORD, rec)
-      end
-
-      def test_s_new_raise
-        assert_raise(WIN32OLERuntimeError) {
-          rec = WIN32OLE_RECORD.new('NonExistRecordName', @obj)
-        }
-        assert_raise(ArgumentError) {
-          rec = WIN32OLE_RECORD.new
-        }
-        assert_raise(ArgumentError) {
-          rec = WIN32OLE_RECORD.new('NonExistRecordName')
-        }
-      end
-
-      def test_to_h
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        assert_equal({'lo'=>nil, 'mid'=>nil, 'hi'=>nil, 'flags'=>nil}, rec.to_h)
-      end
-
-      def test_typename
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        assert_equal('Decimal', rec.typename)
-      end
-
-      def test_method_missing_getter
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        assert_equal(nil, rec.lo)
-        assert_raise(KeyError) {
-          rec.non_exist_name
-        }
-      end
-
-      def test_method_missing_setter
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        rec.lo = 1
-        assert_equal(1, rec.lo)
-      end
-
-      def test_pass_record_parameter
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        rec.lo = 0
-        rec.mid = 1
-        rec.hi = 0
-        rec.flags = false
-        assert_equal(2**32, @obj.ToInt64(rec))
-      end
-
-      def test_ole_instance_variable_get
-        obj = WIN32OLE_RECORD.new('Decimal', @obj)
-        assert_equal(nil, obj.ole_instance_variable_get(:lo))
-        assert_equal(nil, obj.ole_instance_variable_get('lo'))
-      end
-
-      def test_ole_instance_variable_set
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        rec.ole_instance_variable_set(:lo, 1)
-        assert_equal(1, rec.lo)
-        rec.ole_instance_variable_set('lo', 2)
-        assert_equal(2, rec.lo)
-      end
-
-      def test_inspect
-        rec = WIN32OLE_RECORD.new('Decimal', @obj)
-        assert_equal(%q[#<WIN32OLE_RECORD(Decimal) {"flags"=>nil, "hi"=>nil, "lo"=>nil, "mid"=>nil}>], rec.inspect)
-      end
-
-    end
-  end
-
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]