зеркало из https://github.com/github/ruby.git
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:
Родитель
228d36fb35
Коммит
34dc263af8
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче