* test/mkmf/base.rb (TestMkmf): was turned into a class, because
MiniUnit doesn't complain even if a testcase has no tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a032b1bdb8
commit
f86f669cf3
@ -9,15 +9,22 @@ RbConfig::CONFIG["cppflags"] << " -I."
|
|||||||
CONFIG["cppflags"] << " -I."
|
CONFIG["cppflags"] << " -I."
|
||||||
$extout_prefix = "$(extout)$(target_prefix)/"
|
$extout_prefix = "$(extout)$(target_prefix)/"
|
||||||
|
|
||||||
module TestMkmf
|
class TestMkmf < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
@tmpdir = Dir.mktmpdir
|
@tmpdir = Dir.mktmpdir
|
||||||
@curdir = Dir.pwd
|
@curdir = Dir.pwd
|
||||||
@mkmfobj = Object.new
|
@mkmfobj = Object.new
|
||||||
Dir.chdir(@tmpdir)
|
Dir.chdir(@tmpdir)
|
||||||
|
class << (@output = "")
|
||||||
|
def flush; end
|
||||||
|
def reopen(*) end
|
||||||
|
alias write <<
|
||||||
|
end
|
||||||
|
$stdout = @output
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
|
$stdout = STDOUT
|
||||||
Dir.chdir(@curdir)
|
Dir.chdir(@curdir)
|
||||||
FileUtils.rm_rf(@tmpdir)
|
FileUtils.rm_rf(@tmpdir)
|
||||||
end
|
end
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
require_relative 'base'
|
require_relative 'base'
|
||||||
|
|
||||||
module TestMkmf
|
class TestMkmf
|
||||||
class TestSizeof < Test::Unit::TestCase
|
class TestSizeof < TestMkmf
|
||||||
include TestMkmf
|
|
||||||
|
|
||||||
def test_sizeof
|
def test_sizeof
|
||||||
open("confdefs.h", "w") {|f|
|
open("confdefs.h", "w") {|f|
|
||||||
f.puts "typedef struct {char x;} test1_t;"
|
f.puts "typedef struct {char x;} test1_t;"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user