Sha256: 4f80f6257c10ef4476ff693be02c19790aafe04f17a75c7be3c93d8da88b2564

Contents?: true

Size: 669 Bytes

Versions: 100

Compression:

Stored size: 669 Bytes

Contents

# -*- coding: utf-8 -*-

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
    only_glib_version(2, 14, 0)
    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

100 entries across 100 versions & 1 rubygems

Version Path
glib2-3.0.5-x64-mingw32 test/test_timeout.rb
glib2-3.0.5-x86-mingw32 test/test_timeout.rb
glib2-3.0.5 test/test_timeout.rb
glib2-3.0.4-x86-mingw32 test/test_timeout.rb
glib2-3.0.4-x64-mingw32 test/test_timeout.rb
glib2-3.0.4 test/test_timeout.rb
glib2-3.0.3-x64-mingw32 test/test_timeout.rb
glib2-3.0.3-x86-mingw32 test/test_timeout.rb
glib2-3.0.3 test/test_timeout.rb
glib2-3.0.2-x86-mingw32 test/test_timeout.rb
glib2-3.0.2-x64-mingw32 test/test_timeout.rb
glib2-3.0.2 test/test_timeout.rb
glib2-3.0.1-x86-mingw32 test/test_timeout.rb
glib2-3.0.1-x64-mingw32 test/test_timeout.rb
glib2-3.0.1 test/test_timeout.rb
glib2-3.0.0-x86-mingw32 test/test_timeout.rb
glib2-3.0.0-x64-mingw32 test/test_timeout.rb
glib2-2.2.5-x64-mingw32 test/test_timeout.rb
glib2-2.2.5-x86-mingw32 test/test_timeout.rb
glib2-2.2.5 test/test_timeout.rb