Sha256: 88d752c29d330418e71901508446729a574fb938e9e99f2efdf7c1cb4312228a

Contents?: true

Size: 699 Bytes

Versions: 38

Compression:

Stored size: 699 Bytes

Contents

require 'test/unit'
require 'fox16'
require 'testcase'

include Fox

class TC_FXSettings < TestCase

  def setup
    super(self.class.name)
  end
  
  def test_each_section_empty_settings
    empty = FXSettings.new
    num_sections = 0
    empty.each_section do |sect|
      num_sections = num_sections + 1
    end
    assert_equal(0, num_sections)
  end
  
  def test_each_section
    settings = FXSettings.new
    settings.writeStringEntry('sect1', 'key1', 'value1')
    settings.writeStringEntry('sect2', 'key2', 'value2')
    keys = []
    settings.each_section do |sect|
      sect.each_key do |key|
        keys << key
      end
    end
    assert_equal(['key1', 'key2'], keys.sort)
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
fxruby-1.6.20-x86-mingw32 test/TC_FXSettings.rb
fxruby-1.6.20-x86-linux test/TC_FXSettings.rb
fxruby-1.6.20 test/TC_FXSettings.rb
fxruby-1.6.20-universal-darwin-10 test/TC_FXSettings.rb
fxruby-1.6.19-x86-mingw32 tests/TC_FXSettings.rb
fxruby-1.6.14-mswin32 tests/TC_FXSettings.rb
fxruby-1.6.13-mswin32 tests/TC_FXSettings.rb
fxruby-1.6.0 tests/TC_FXSettings.rb
fxruby-1.6.1 tests/TC_FXSettings.rb
fxruby-1.6.11 tests/TC_FXSettings.rb
fxruby-1.6.10 tests/TC_FXSettings.rb
fxruby-1.6.12 tests/TC_FXSettings.rb
fxruby-1.6.13 tests/TC_FXSettings.rb
fxruby-1.6.14-universal-darwin-9 tests/TC_FXSettings.rb
fxruby-1.6.14 tests/TC_FXSettings.rb
fxruby-1.6.15-universal-darwin-9 tests/TC_FXSettings.rb
fxruby-1.6.15-x86-mswin32-60 tests/TC_FXSettings.rb
fxruby-1.6.15 tests/TC_FXSettings.rb
fxruby-1.6.16-universal-darwin-9 tests/TC_FXSettings.rb
fxruby-1.6.16-x86-mswin32-60 tests/TC_FXSettings.rb