2015-12-16 08:07:31 +03:00
|
|
|
# frozen_string_literal: false
|
2012-12-05 10:30:39 +04:00
|
|
|
require_relative 'base'
|
|
|
|
require 'tempfile'
|
|
|
|
|
|
|
|
class TestMkmf
|
|
|
|
class TestHaveFunc < TestMkmf
|
|
|
|
def test_have_func
|
|
|
|
assert_equal(true, have_func("ruby_init"), MKMFLOG)
|
2015-12-29 04:37:20 +03:00
|
|
|
assert_include($defs, '-DHAVE_RUBY_INIT')
|
2012-12-05 10:30:39 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
def test_not_have_func
|
|
|
|
assert_equal(false, have_func("no_ruby_init"), MKMFLOG)
|
2015-12-29 04:37:20 +03:00
|
|
|
assert_not_include($defs, '-DHAVE_RUBY_INIT')
|
2012-12-05 10:30:39 +04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|