mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
228d36fb35
commit
34dc263af8
1 changed files with 14 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue