fxruby 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,57 @@
1
+ require 'test/unit'
2
+ require 'testcase'
3
+ require 'fox14'
4
+
5
+ include Fox
6
+
7
+ class TC_FXMenuRadio < TestCase
8
+ def setup
9
+ super(self.class.name)
10
+ @menuRadio = FXMenuRadio.new(mainWindow, "menuRadio")
11
+ end
12
+
13
+ def test_setCheck_TRUE
14
+ @menuRadio.check = Fox::TRUE
15
+ assert_equal(true, @menuRadio.check)
16
+ assert_equal(Fox::TRUE, @menuRadio.checkState)
17
+ assert(@menuRadio.checked?)
18
+ assert(!@menuRadio.unchecked?)
19
+ assert(!@menuRadio.maybe?)
20
+ end
21
+
22
+ def test_setCheck_FALSE
23
+ @menuRadio.check = Fox::FALSE
24
+ assert_equal(false, @menuRadio.check)
25
+ assert_equal(Fox::FALSE, @menuRadio.checkState)
26
+ assert(!@menuRadio.checked?)
27
+ assert(@menuRadio.unchecked?)
28
+ assert(!@menuRadio.maybe?)
29
+ end
30
+
31
+ def test_setCheck_MAYBE
32
+ @menuRadio.check = Fox::MAYBE
33
+ assert_equal(true, @menuRadio.check) # this is not a typo!
34
+ assert_equal(Fox::MAYBE, @menuRadio.checkState)
35
+ assert(!@menuRadio.checked?)
36
+ assert(!@menuRadio.unchecked?)
37
+ assert(@menuRadio.maybe?)
38
+ end
39
+
40
+ def test_setCheck_true
41
+ @menuRadio.check = true
42
+ assert_equal(true, @menuRadio.check)
43
+ assert_equal(Fox::TRUE, @menuRadio.checkState)
44
+ assert(@menuRadio.checked?)
45
+ assert(!@menuRadio.unchecked?)
46
+ assert(!@menuRadio.maybe?)
47
+ end
48
+
49
+ def test_setCheck_false
50
+ @menuRadio.check = false
51
+ assert_equal(false, @menuRadio.check)
52
+ assert_equal(Fox::FALSE, @menuRadio.checkState)
53
+ assert(!@menuRadio.checked?)
54
+ assert(@menuRadio.unchecked?)
55
+ assert(!@menuRadio.maybe?)
56
+ end
57
+ end
@@ -0,0 +1,34 @@
1
+ require 'test/unit'
2
+ require 'fox14'
3
+ require 'testcase'
4
+
5
+ include Fox
6
+
7
+ class TC_FXSettings < TestCase
8
+
9
+ def setup
10
+ super(self.class.name)
11
+ end
12
+
13
+ def test_each_section_empty_settings
14
+ empty = FXSettings.new
15
+ num_sections = 0
16
+ empty.each_section do |sect|
17
+ num_sections = num_sections + 1
18
+ end
19
+ assert_equal(0, num_sections)
20
+ end
21
+
22
+ def test_each_section
23
+ settings = FXSettings.new
24
+ settings.writeStringEntry('sect1', 'key1', 'value1')
25
+ settings.writeStringEntry('sect2', 'key2', 'value2')
26
+ keys = []
27
+ settings.each_section do |sect|
28
+ sect.each_key do |key|
29
+ keys << key
30
+ end
31
+ end
32
+ assert_equal(['key1', 'key2'], keys.sort)
33
+ end
34
+ end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: fxruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.4.1
7
- date: 2005-08-20
6
+ version: 1.4.2
7
+ date: 2005-08-22
8
8
  summary: FXRuby is the Ruby binding to the FOX GUI toolkit.
9
9
  require_paths:
10
10
  - ext/fox14
@@ -516,7 +516,9 @@ files:
516
516
  - tests/TC_FXMat4f.rb
517
517
  - tests/TC_FXMaterial.rb
518
518
  - tests/TC_FXMemoryStream.rb
519
+ - tests/TC_FXMenuCheck.rb
519
520
  - tests/TC_FXMenuCommand.rb
521
+ - tests/TC_FXMenuRadio.rb
520
522
  - tests/TC_FXPoint.rb
521
523
  - tests/TC_FXQuatf.rb
522
524
  - tests/TC_FXRadioButton.rb
@@ -527,6 +529,7 @@ files:
527
529
  - tests/TC_FXScrollArea.rb
528
530
  - tests/TC_FXScrollWindow.rb
529
531
  - tests/TC_FXSegment.rb
532
+ - tests/TC_FXSettings.rb
530
533
  - tests/TC_FXShell.rb
531
534
  - tests/TC_FXSize.rb
532
535
  - tests/TC_FXStream.rb