Remove various warnings about unused variables in the test suite.
Lars Kanis
8 years ago
7 | 7 |
|
8 | 8 |
def test_exception_for_second_app
|
9 | 9 |
assert_raise RuntimeError do
|
10 | |
app2 = FXApp.new
|
|
10 |
FXApp.new
|
11 | 11 |
end
|
12 | 12 |
end
|
13 | 13 |
end
|
|
45 | 45 |
end
|
46 | 46 |
|
47 | 47 |
def test_addInput_on_pipe
|
48 | |
check_events *IO.pipe
|
|
48 |
check_events(*IO.pipe)
|
49 | 49 |
end
|
50 | 50 |
|
51 | 51 |
def test_addInput_on_socket_accept
|
14 | 14 |
|
15 | 15 |
def testConstructFromFontDescription
|
16 | 16 |
fontdesc = @app.normalFont.fontDesc
|
17 | |
font = FXFont.new(@app, fontdesc)
|
|
17 |
FXFont.new(@app, fontdesc)
|
18 | 18 |
end
|
19 | 19 |
|
20 | 20 |
def testConstructFromParameters
|
|
41 | 41 |
end
|
42 | 42 |
|
43 | 43 |
def testConstructFromFontString
|
44 | |
font = FXFont.new(@app, "")
|
|
44 |
FXFont.new(@app, "")
|
45 | 45 |
end
|
46 | 46 |
|
47 | 47 |
def testGetTextWidthAndHeight
|
118 | 118 |
def test_create_with_non_owned_data
|
119 | 119 |
GC.stress = true
|
120 | 120 |
img = image_with_non_owned_data
|
121 | |
" " * 10000
|
|
121 |
_ = " " * 10000
|
122 | 122 |
GC.stress = false
|
123 | 123 |
assert_equal("rgbaRGBA", img.pixel_string)
|
124 | 124 |
assert_equal(0, img.options)
|
|
133 | 133 |
img = FXImage.new(app, nil, 0, 1, 2)
|
134 | 134 |
GC.stress = true
|
135 | 135 |
set_non_owned_data(img)
|
136 | |
" " * 10000
|
|
136 |
_ = " " * 10000
|
137 | 137 |
GC.stress = false
|
138 | 138 |
assert_equal("rgbaRGBA", img.pixel_string)
|
139 | 139 |
assert_equal(0, img.options)
|
80 | 80 |
def test_mul_by_scalar
|
81 | 81 |
p = FXMat4f.new.eye
|
82 | 82 |
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)
|
86 | 86 |
r = p*4.0
|
87 | 87 |
assert_instance_of(FXMat4f, r)
|
88 | 88 |
# assert_equal(q, r)
|
8 | 8 |
end
|
9 | 9 |
|
10 | 10 |
def test_default_constructor
|
11 | |
q = FXQuatf.new
|
|
11 |
FXQuatf.new
|
12 | 12 |
end
|
13 | 13 |
|
14 | 14 |
def test_construct_from_axis_and_angle
|
15 | 15 |
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)
|
18 | 18 |
end
|
19 | 19 |
|
20 | 20 |
def test_construct_from_components
|
21 | 21 |
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)
|
23 | 23 |
end
|
24 | 24 |
|
25 | 25 |
def test_construct_from_roll_pitch_yaw
|
26 | 26 |
roll, pitch, yaw = 45.0, 45.0, 45.0
|
27 | |
q = FXQuatf.new(roll, pitch, yaw)
|
|
27 |
FXQuatf.new(roll, pitch, yaw)
|
28 | 28 |
end
|
29 | 29 |
|
30 | 30 |
def test_adjust!
|
16 | 16 |
FXPoint.new(100, 100),
|
17 | 17 |
FXPoint.new(0, 0)
|
18 | 18 |
]
|
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)
|
22 | 22 |
end
|
23 | 23 |
|
24 | 24 |
def test_copy_constructor
|
21 | 21 |
def test_new
|
22 | 22 |
# Free-floating
|
23 | 23 |
shell1 = FXShell.new(@app, 0, 0, 0, 0, 0)
|
|
24 |
assert_nil(shell1.owner)
|
24 | 25 |
|
25 | 26 |
# Owned
|
26 | 27 |
shell2 = FXShell.new(@mainWin, 0, 0, 0, 0, 0)
|
75 | 75 |
clearEdges(extending)
|
76 | 76 |
|
77 | 77 |
old_nr = @table.numRows
|
78 | |
old_nc = @table.numColumns
|
|
78 |
_old_nc = @table.numColumns
|
79 | 79 |
|
80 | 80 |
# resize the table
|
81 | 81 |
nr = @data_lines.size + 2
|
38 | 38 |
end
|
39 | 39 |
|
40 | 40 |
def test_new5
|
41 | |
c = FXVec4f.new(FXRGB(128, 128, 128))
|
|
41 |
FXVec4f.new(FXRGB(128, 128, 128))
|
42 | 42 |
end
|
43 | 43 |
|
44 | 44 |
def test_getitem
|