summaryrefslogtreecommitdiff
path: root/test/mkmf
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-05 06:30:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-05 06:30:36 +0000
commit34dc263af894ece623b99f1138eccf4f5b806724 (patch)
treee73912f45ccf040b1ecaca440e074a6cf53da9d3 /test/mkmf
parent228d36fb359650d010433ea6db6f7b76e9d8a3a7 (diff)
test_have_library.rb: assert_have_library
* test/mkmf/test_have_library.rb (assert_have_library): extract. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf')
-rw-r--r--test/mkmf/test_have_library.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/mkmf/test_have_library.rb b/test/mkmf/test_have_library.rb
index c3ca53c..3cdc6e2 100644
--- a/test/mkmf/test_have_library.rb
+++ b/test/mkmf/test_have_library.rb
@@ -23,23 +23,31 @@ class TestMkmf
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