Sha256: c083271d74968b15214dc5e0d4fdcbf64a258024b5cc30b9a43fdca93f006c6a

Contents?: true

Size: 1.36 KB

Versions: 34

Compression:

Stored size: 1.36 KB

Contents

# Copyright (C) 2015-2021  Ruby-GNOME Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

class TestGLibTimeout < Test::Unit::TestCase
  include GLibTestUtils

  def setup
    @id = nil
  end

  def teardown
    GLib::Source.remove(@id) if @id
  end

  def test_timeout_add_priority
    priority = GLib::PRIORITY_HIGH
    @id = GLib::Timeout.add(10, priority)
    source = GLib::MainContext.default.find_source(@id)
    assert_equal(priority, source.priority)
  end

  def test_timeout_add_seconds_priority
    priority = GLib::PRIORITY_HIGH
    @id = GLib::Timeout.add_seconds(10, priority)
    source = GLib::MainContext.default.find_source(@id)
    assert_equal(priority, source.priority)
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
glib2-4.2.5 test/test-timeout.rb
glib2-4.2.4 test/test-timeout.rb
glib2-4.2.3 test/test-timeout.rb
glib2-4.2.2 test/test-timeout.rb
glib2-4.2.1 test/test-timeout.rb
glib2-4.2.0 test/test-timeout.rb
glib2-4.1.9 test/test-timeout.rb
glib2-4.1.8 test/test-timeout.rb
glib2-4.1.7 test/test-timeout.rb
glib2-4.1.6 test/test-timeout.rb
glib2-4.1.5 test/test-timeout.rb
glib2-4.1.4 test/test-timeout.rb
glib2-4.1.3 test/test-timeout.rb
glib2-4.1.2 test/test-timeout.rb
glib2-4.1.1 test/test-timeout.rb
glib2-4.1.0 test/test-timeout.rb
glib2-4.0.9 test/test-timeout.rb
glib2-4.0.8 test/test-timeout.rb
glib2-4.0.7 test/test-timeout.rb
glib2-4.0.6 test/test-timeout.rb