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-1.0.1-x86-mingw32 test/test_timeout.rb
glib2-1.0.0-x86-mingw32 test/test_timeout.rb
glib2-1.0.0 test/test_timeout.rb
glib2-0.90.9 test/test_timeout.rb
glib2-0.90.9-x86-mingw32 test/test_timeout.rb
glib2-0.90.8-x86-mingw32 test/test_timeout.rb
glib2-0.90.8 test/test_timeout.rb
glib2-0.90.7-x86-mingw32 test/test_timeout.rb
glib2-0.90.7 test/test_timeout.rb
glib2-0.90.6 test/test_timeout.rb
glib2-0.90.6-x86-mingw32 test/test_timeout.rb
glib2-0.90.5 test/test_timeout.rb
glib2-0.90.5-x86-mingw32 test/test_timeout.rb
glib2-0.90.4 test/test_timeout.rb
glib2-0.90.4-x86-mingw32 test/test_timeout.rb
glib2-0.90.3 test/test_timeout.rb
glib2-0.90.3-x86-mingw32 test/test_timeout.rb
glib2-0.90.2 test/test_timeout.rb
glib2-0.90.2-x86-mingw32 test/test_timeout.rb
glib2-0.20.0 test/test_timeout.rb