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

ruby-changes:26149

From: nobu <ko1@a...>
Date: Wed, 5 Dec 2012 15:30:49 +0900 (JST)
Subject: [ruby-changes:26149] nobu:r38206 (trunk): test_have_library.rb: assert_have_library

nobu	2012-12-05 15:30:36 +0900 (Wed, 05 Dec 2012)

  New Revision: 38206

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

  Log:
    test_have_library.rb: assert_have_library
    
    * test/mkmf/test_have_library.rb (assert_have_library): extract.

  Modified files:
    trunk/test/mkmf/test_have_library.rb

Index: test/mkmf/test_have_library.rb
===================================================================
--- test/mkmf/test_have_library.rb	(revision 38205)
+++ test/mkmf/test_have_library.rb	(revision 38206)
@@ -23,23 +23,31 @@
       end
     end
 
+    def assert_have_library(*args)
+      assert_equal(true, have_library(LIBRARY_NAME, *args), MKMFLOG)
+    end
+
+    def assert_not_have_library(*args)
+      assert_equal(false, have_library(LIBRARY_NAME, *args), MKMFLOG)
+    end
+
     def test_have_library
       create_library
-      assert_equal(true, have_library(LIBRARY_NAME), MKMFLOG)
+      assert_have_library
     end
 
     def test_have_library_with_name
       create_library
-      assert_equal(true, have_library(LIBRARY_NAME, FUNC_NAME, HEADER_NAME), MKMFLOG)
+      assert_have_library(FUNC_NAME, HEADER_NAME)
     end
 
-    def test_no_have_library
-      assert_equal(false, have_library(LIBRARY_NAME), MKMFLOG)
+    def test_not_have_library
+      assert_not_have_library
     end
 
-    def test_no_have_library_with_name
+    def test_not_have_library_with_name
       create_library
-      assert_equal(false, have_library(LIBRARY_NAME, "#{FUNC_NAME}_fake", HEADER_NAME), MKMFLOG)
+      assert_not_have_library("#{FUNC_NAME}_fake", HEADER_NAME)
     end
   end
 end

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

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