Sha256: 18711eec88cdb4ca08e3bfd73bcb62c4e76abbd095716c08acbc1683c8f34b86

Contents?: true

Size: 1.02 KB

Versions: 21

Compression:

Stored size: 1.02 KB

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

require_relative './lib/wxapp_runner'

class AppTraitsTests < Test::Unit::TestCase

  def test_traits
    traits = Wx.get_app.get_traits
    assert_not_nil(traits)
    assert_kind_of(Wx::AppTraits, traits)
    port_id, ver_major, ver_minor, ver_micro = traits.get_toolkit_version
    port = case port_id
           when Wx::PortId::PORT_GTK; 'WXGTK'
           when Wx::PortId::PORT_MAC; 'WXOSX'
           when Wx::PortId::PORT_MSW; 'WXMSW'
           else
             nil
           end
    assert_equal(Wx::PLATFORM, port)
    assert_true(Wx::PlatformInfo.instance.check_toolkit_version(ver_major, ver_minor, ver_micro))

    std_paths = traits.get_standard_paths
    assert_not_nil(std_paths)
    assert_kind_of(Wx::StandardPaths, std_paths)
    assert_not_empty(std_paths.config_dir)
    assert_not_empty(std_paths.data_dir)
    assert_not_empty(std_paths.documents_dir)
    assert_not_empty(std_paths.app_documents_dir)
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
wxruby3-1.5.1 tests/test_app_traits.rb
wxruby3-1.5.0 tests/test_app_traits.rb
wxruby3-1.4.2 tests/test_app_traits.rb
wxruby3-1.4.1 tests/test_app_traits.rb
wxruby3-1.4.0 tests/test_app_traits.rb
wxruby3-1.3.1 tests/test_app_traits.rb
wxruby3-1.3.0 tests/test_app_traits.rb
wxruby3-1.2.1 tests/test_app_traits.rb
wxruby3-1.2.0 tests/test_app_traits.rb
wxruby3-1.1.2 tests/test_app_traits.rb
wxruby3-1.1.1 tests/test_app_traits.rb
wxruby3-1.1.0 tests/test_app_traits.rb
wxruby3-1.0.1 tests/test_app_traits.rb
wxruby3-0.9.8 tests/test_app_traits.rb
wxruby3-0.9.7 tests/test_app_traits.rb
wxruby3-0.9.5 tests/test_app_traits.rb
wxruby3-0.9.4 tests/test_app_traits.rb
wxruby3-0.9.3 tests/test_app_traits.rb
wxruby3-0.9.2 tests/test_app_traits.rb
wxruby3-0.9.1 tests/test_app_traits.rb