fxruby 1.6.18-x86-mswin32-60 → 1.6.19-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,5 @@
1
1
  require 'test/unit'
2
2
  require 'fox16'
3
- require 'ftools'
4
3
  require 'tempfile'
5
4
 
6
5
  include Fox
@@ -84,7 +83,7 @@ class TC_FXFileStream < Test::Unit::TestCase
84
83
 
85
84
  def teardown
86
85
  if File.exists?("goobers")
87
- File.rm_f("goobers")
86
+ FileUtils.rm_f("goobers")
88
87
  end
89
88
  end
90
89
  end
@@ -10,10 +10,10 @@ class TC_FXId < TestCase
10
10
  end
11
11
 
12
12
  def test_created?
13
- assert(!mainWindow.created?)
13
+ assert !mainWindow.created?
14
14
  app.create
15
- assert(mainWindow.created?)
15
+ assert mainWindow.created?, "main window should be created after call to FXApp#create"
16
16
  mainWindow.destroy
17
- assert(!mainWindow.created?)
17
+ assert !mainWindow.created?
18
18
  end
19
19
  end
@@ -7,63 +7,83 @@ class TC_FXQuatf < Test::Unit::TestCase
7
7
  def setup
8
8
  @quat = FXQuatf.new
9
9
  end
10
+
10
11
  def test_default_constructor
11
12
  q = FXQuatf.new
12
13
  end
14
+
13
15
  def test_construct_from_axis_and_angle
14
16
  axis = FXVec3f.new(1.0, 1.0, 1.0)
15
17
  q = FXQuatf.new(axis)
16
18
  q = FXQuatf.new(axis, 0.0)
17
19
  end
20
+
18
21
  def test_construct_from_components
19
22
  x, y, z, w = 1.0, 1.0, 1.0, 1.0
20
23
  q = FXQuatf.new(x, y, z, w)
21
24
  end
25
+
22
26
  def test_construct_from_roll_pitch_yaw
23
27
  roll, pitch, yaw = 45.0, 45.0, 45.0
24
28
  q = FXQuatf.new(roll, pitch, yaw)
25
29
  end
30
+
26
31
  def test_adjust!
27
32
  adjusted = @quat.adjust!
28
33
  assert_same(@quat, adjusted)
29
34
  end
35
+
30
36
  def test_setRollPitchYaw
31
37
  roll, pitch, yaw = 0.0, 0.0, 0.0
32
38
  @quat.setRollPitchYaw(roll, pitch, yaw)
33
39
  end
40
+
34
41
  def test_getRollPitchYaw
35
42
  rpy = @quat.getRollPitchYaw()
36
43
  assert_instance_of(Array, rpy)
37
44
  assert_equal(3, rpy.length)
38
45
  end
46
+
39
47
  def test_exp
40
48
  expQuat = @quat.exp
41
49
  assert_instance_of(FXQuatf, expQuat)
42
50
  end
51
+
43
52
  def test_log
44
53
  logQuat = @quat.log
45
54
  assert_instance_of(FXQuatf, logQuat)
46
55
  end
56
+
47
57
  def test_invert
48
58
  invertQuat = @quat.invert
49
59
  assert_instance_of(FXQuatf, invertQuat)
50
60
  end
61
+
51
62
  def test_conj
52
63
  conjQuat = @quat.conj
53
64
  assert_instance_of(FXQuatf, conjQuat)
54
65
  end
55
- def test_mul
56
- anotherQuat = FXQuatf.new
57
- product = @quat*anotherQuat
66
+
67
+ def test_multiplication_result_is_another_quat
68
+ q1 = FXQuatf.new(1, 2, 3, 4)
69
+ q2 = FXQuatf.new(1, 2, 3, 4)
70
+ product = q1*q2
58
71
  assert_instance_of(FXQuatf, product)
59
- assert_equal(product, anotherQuat*@quat)
60
72
  end
73
+
74
+ def test_multiplication_is_commutative
75
+ q1 = FXQuatf.new(1, 2, 3, 4)
76
+ q2 = FXQuatf.new(1, 2, 3, 4)
77
+ assert_equal(q1*q2, q2*q1)
78
+ end
79
+
61
80
  def test_arc
62
81
  a = FXVec3f.new(0.0, 0.0, 0.0)
63
82
  b = FXVec3f.new(0.0, 0.0, 0.0)
64
83
  q = FXQuatf.arc(a, b)
65
84
  assert_instance_of(FXQuatf, q)
66
85
  end
86
+
67
87
  def test_lerp
68
88
  u = FXQuatf.new
69
89
  v = FXQuatf.new
@@ -20,7 +20,7 @@ class DirTree < FXTreeList
20
20
 
21
21
  def create
22
22
  super
23
- item = addItemLast(nil, "root")
23
+ item = appendItem(nil, "root")
24
24
  @currentItem = item
25
25
  expand
26
26
  end
@@ -34,7 +34,7 @@ class DirTree < FXTreeList
34
34
  def listSubDir(parentItem)
35
35
  entries = (1..NUMBER_OF_ITEMS).collect { |i| i.to_s }
36
36
  entries.each do |entry|
37
- item = addItemLast(parentItem, entry)
37
+ item = appendItem(parentItem, entry)
38
38
  @currentItem = item if entry == "1"
39
39
  end
40
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fxruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.18
4
+ version: 1.6.19
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Lyle Johnson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-29 00:00:00 -06:00
12
+ date: 2009-03-11 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -25,6 +25,7 @@ extra_rdoc_files:
25
25
  files:
26
26
  - LICENSE
27
27
  - README
28
+ - index.html
28
29
  - doc/style.css
29
30
  - doc/apes02.html
30
31
  - doc/apes03.html
@@ -208,6 +209,7 @@ files:
208
209
  - examples/textedit/helpwindow.rb
209
210
  - examples/textedit/prefdialog.rb
210
211
  - examples/textedit/textedit.rb
212
+ - lib/fox16/accel_table.rb
211
213
  - lib/fox16/aliases.rb
212
214
  - lib/fox16/calendar.rb
213
215
  - lib/fox16/chore.rb
@@ -254,6 +256,8 @@ files:
254
256
  - tests/TC_FXDCWindow.rb
255
257
  - tests/TC_FXDialogBox.rb
256
258
  - tests/TC_FXDirList.rb
259
+ - tests/TC_FXExtentd.rb
260
+ - tests/TC_FXExtentf.rb
257
261
  - tests/TC_FXFileAssoc.rb
258
262
  - tests/TC_FXFileStream.rb
259
263
  - tests/TC_FXFoldingList.rb
@@ -544,7 +548,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
544
548
  requirements:
545
549
  - FOX library version 1.6.0 or higher
546
550
  rubyforge_project:
547
- rubygems_version: 1.2.0
551
+ rubygems_version: 1.3.1
548
552
  signing_key:
549
553
  specification_version: 2
550
554
  summary: FXRuby is the Ruby binding to the FOX GUI toolkit.