test/test_timerfd.rb in sleepy_penguin-3.2.0 vs test/test_timerfd.rb in sleepy_penguin-3.3.0

- old
+ new

@@ -1,26 +1,22 @@ -require 'test/unit' +require './test/helper' require 'fcntl' $-w = true require 'sleepy_penguin' -class TestTimerFD < Test::Unit::TestCase +class TestTimerFD < Testcase include SleepyPenguin def test_constants assert_kind_of Integer, TimerFD::REALTIME assert_kind_of Integer, TimerFD::MONOTONIC end def test_create tfd = TimerFD.new assert_kind_of(IO, tfd) - if RUBY_VERSION.to_f >= 2.0 - assert_equal 1, tfd.fcntl(Fcntl::F_GETFD) - else - assert_equal 0, tfd.fcntl(Fcntl::F_GETFD) - end + check_cloexec(tfd) end def test_create_nonblock tfd = TimerFD.new(TimerFD::REALTIME, TimerFD::NONBLOCK) flags = tfd.fcntl(Fcntl::F_GETFL) & Fcntl::O_NONBLOCK