Codebase list ruby-fxruby / 9bb3eb4
Remove various warnings about unused variables in the test suite. Lars Kanis 8 years ago
9 changed file(s) with 20 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
77
88 def test_exception_for_second_app
99 assert_raise RuntimeError do
10 app2 = FXApp.new
10 FXApp.new
1111 end
1212 end
1313 end
4545 end
4646
4747 def test_addInput_on_pipe
48 check_events *IO.pipe
48 check_events(*IO.pipe)
4949 end
5050
5151 def test_addInput_on_socket_accept
1414
1515 def testConstructFromFontDescription
1616 fontdesc = @app.normalFont.fontDesc
17 font = FXFont.new(@app, fontdesc)
17 FXFont.new(@app, fontdesc)
1818 end
1919
2020 def testConstructFromParameters
4141 end
4242
4343 def testConstructFromFontString
44 font = FXFont.new(@app, "")
44 FXFont.new(@app, "")
4545 end
4646
4747 def testGetTextWidthAndHeight
118118 def test_create_with_non_owned_data
119119 GC.stress = true
120120 img = image_with_non_owned_data
121 " " * 10000
121 _ = " " * 10000
122122 GC.stress = false
123123 assert_equal("rgbaRGBA", img.pixel_string)
124124 assert_equal(0, img.options)
133133 img = FXImage.new(app, nil, 0, 1, 2)
134134 GC.stress = true
135135 set_non_owned_data(img)
136 " " * 10000
136 _ = " " * 10000
137137 GC.stress = false
138138 assert_equal("rgbaRGBA", img.pixel_string)
139139 assert_equal(0, img.options)
8080 def test_mul_by_scalar
8181 p = FXMat4f.new.eye
8282 q = FXMat4f.new(4.0, 0.0, 0.0, 0.0,
83 0.0, 4.0, 0.0, 0.0,
84 0.0, 0.0, 4.0, 0.0,
85 0.0, 0.0, 0.0, 4.0)
83 0.0, 4.0, 0.0, 0.0,
84 0.0, 0.0, 4.0, 0.0,
85 0.0, 0.0, 0.0, 4.0)
8686 r = p*4.0
8787 assert_instance_of(FXMat4f, r)
8888 # assert_equal(q, r)
88 end
99
1010 def test_default_constructor
11 q = FXQuatf.new
11 FXQuatf.new
1212 end
1313
1414 def test_construct_from_axis_and_angle
1515 axis = FXVec3f.new(1.0, 1.0, 1.0)
16 q = FXQuatf.new(axis)
17 q = FXQuatf.new(axis, 0.0)
16 FXQuatf.new(axis)
17 FXQuatf.new(axis, 0.0)
1818 end
1919
2020 def test_construct_from_components
2121 x, y, z, w = 1.0, 1.0, 1.0, 1.0
22 q = FXQuatf.new(x, y, z, w)
22 FXQuatf.new(x, y, z, w)
2323 end
2424
2525 def test_construct_from_roll_pitch_yaw
2626 roll, pitch, yaw = 45.0, 45.0, 45.0
27 q = FXQuatf.new(roll, pitch, yaw)
27 FXQuatf.new(roll, pitch, yaw)
2828 end
2929
3030 def test_adjust!
1616 FXPoint.new(100, 100),
1717 FXPoint.new(0, 0)
1818 ]
19 r1 = FXRegion.new(points, true)
20 r2 = FXRegion.new(points, false)
21 r3 = FXRegion.new(points)
19 FXRegion.new(points, true)
20 FXRegion.new(points, false)
21 FXRegion.new(points)
2222 end
2323
2424 def test_copy_constructor
2121 def test_new
2222 # Free-floating
2323 shell1 = FXShell.new(@app, 0, 0, 0, 0, 0)
24 assert_nil(shell1.owner)
2425
2526 # Owned
2627 shell2 = FXShell.new(@mainWin, 0, 0, 0, 0, 0)
7575 clearEdges(extending)
7676
7777 old_nr = @table.numRows
78 old_nc = @table.numColumns
78 _old_nc = @table.numColumns
7979
8080 # resize the table
8181 nr = @data_lines.size + 2
3838 end
3939
4040 def test_new5
41 c = FXVec4f.new(FXRGB(128, 128, 128))
41 FXVec4f.new(FXRGB(128, 128, 128))
4242 end
4343
4444 def test_getitem