[Fxruby-commits] CVS: FXRuby/tests TC_FXAccelTable.rb,1.1,1.2 TC_FXFileAssoc.rb,1.1,1.2 TC_FXFileStr
Status: Inactive
Brought to you by:
lyle
|
From: Lyle J. <ly...@us...> - 2002-07-11 13:33:18
|
Update of /cvsroot/fxruby/FXRuby/tests
In directory usw-pr-cvs1:/tmp/cvs-serv26972/tests
Modified Files:
TC_FXHMat.rb TC_FXHVec.rb TC_FXMaterial.rb TC_FXRange.rb
TC_FXViewport.rb
Added Files:
TC_FXAccelTable.rb TC_FXFileAssoc.rb TC_FXFileStream.rb
TC_FXFontDesc.rb TC_FXRegion.rb TC_FXShell.rb
TC_FXTopWindow.rb stress1.rb
Log Message:
Merged changes from the release10 branch back onto the main trunk.
Index: TC_FXHMat.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/TC_FXHMat.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TC_FXHMat.rb 26 Mar 2002 21:35:20 -0000 1.2
--- TC_FXHMat.rb 11 Jul 2002 13:33:14 -0000 1.3
***************
*** 40,42 ****
--- 40,44 ----
def test_scale
end
+ def test_clone
+ end
end
Index: TC_FXHVec.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/TC_FXHVec.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TC_FXHVec.rb 26 Mar 2002 21:35:20 -0000 1.4
--- TC_FXHVec.rb 11 Jul 2002 13:33:15 -0000 1.5
***************
*** 83,85 ****
--- 83,89 ----
assert_equal(vec[3], arr[3])
end
+ def test_copy_constructor
+ vec1 = FXHVec.new(1.0, 2.0, 3.0, 4.0)
+ assert_equal(vec1, FXHVec.new(vec1))
+ end
end
Index: TC_FXMaterial.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/TC_FXMaterial.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TC_FXMaterial.rb 26 Mar 2002 21:35:20 -0000 1.2
--- TC_FXMaterial.rb 11 Jul 2002 13:33:15 -0000 1.3
***************
*** 6,23 ****
class TC_FXMaterial < Test::Unit::TestCase
def set_up
@mat = FXMaterial.new
end
! def testAttributes
! assert_not_nil(@mat.ambient)
! assert_kind_of(FXHVec, @mat.ambient)
! assert_not_nil(@mat.diffuse)
! assert_kind_of(FXHVec, @mat.diffuse)
! assert_not_nil(@mat.specular)
! assert_kind_of(FXHVec, @mat.specular)
! assert_not_nil(@mat.emission)
! assert_kind_of(FXHVec, @mat.emission)
! assert_not_nil(@mat.shininess)
! assert_kind_of(Float, @mat.shininess)
end
end
--- 6,75 ----
class TC_FXMaterial < Test::Unit::TestCase
+
+ DELTA = 1.0e-6
+
def set_up
@mat = FXMaterial.new
end
!
! def test_ambient
! @mat.ambient = [0.5, 0.6, 0.7, 0.8]
! assert_in_delta(0.5, @mat.ambient[0], DELTA)
! assert_in_delta(0.6, @mat.ambient[1], DELTA)
! assert_in_delta(0.7, @mat.ambient[2], DELTA)
! assert_in_delta(0.8, @mat.ambient[3], DELTA)
!
! @mat.ambient = FXHVec.new(0.5, 0.6, 0.7, 0.8)
! assert_in_delta(0.5, @mat.ambient[0], DELTA)
! assert_in_delta(0.6, @mat.ambient[1], DELTA)
! assert_in_delta(0.7, @mat.ambient[2], DELTA)
! assert_in_delta(0.8, @mat.ambient[3], DELTA)
! end
!
! def test_diffuse
! @mat.diffuse = [0.5, 0.6, 0.7, 0.8]
! assert_in_delta(0.5, @mat.diffuse[0], DELTA)
! assert_in_delta(0.6, @mat.diffuse[1], DELTA)
! assert_in_delta(0.7, @mat.diffuse[2], DELTA)
! assert_in_delta(0.8, @mat.diffuse[3], DELTA)
!
! @mat.diffuse = FXHVec.new(0.5, 0.6, 0.7, 0.8)
! assert_in_delta(0.5, @mat.diffuse[0], DELTA)
! assert_in_delta(0.6, @mat.diffuse[1], DELTA)
! assert_in_delta(0.7, @mat.diffuse[2], DELTA)
! assert_in_delta(0.8, @mat.diffuse[3], DELTA)
! end
!
! def test_emission
! @mat.emission = [0.5, 0.6, 0.7, 0.8]
! assert_in_delta(0.5, @mat.emission[0], DELTA)
! assert_in_delta(0.6, @mat.emission[1], DELTA)
! assert_in_delta(0.7, @mat.emission[2], DELTA)
! assert_in_delta(0.8, @mat.emission[3], DELTA)
!
! @mat.emission = FXHVec.new(0.5, 0.6, 0.7, 0.8)
! assert_in_delta(0.5, @mat.emission[0], DELTA)
! assert_in_delta(0.6, @mat.emission[1], DELTA)
! assert_in_delta(0.7, @mat.emission[2], DELTA)
! assert_in_delta(0.8, @mat.emission[3], DELTA)
! end
!
! def test_emission
! @mat.emission = [0.5, 0.6, 0.7, 0.8]
! assert_in_delta(0.5, @mat.emission[0], DELTA)
! assert_in_delta(0.6, @mat.emission[1], DELTA)
! assert_in_delta(0.7, @mat.emission[2], DELTA)
! assert_in_delta(0.8, @mat.emission[3], DELTA)
!
! @mat.emission = FXHVec.new(0.5, 0.6, 0.7, 0.8)
! assert_in_delta(0.5, @mat.emission[0], DELTA)
! assert_in_delta(0.6, @mat.emission[1], DELTA)
! assert_in_delta(0.7, @mat.emission[2], DELTA)
! assert_in_delta(0.8, @mat.emission[3], DELTA)
! end
!
! def test_shininess
! @mat.shininess = 0.5
! assert_in_delta(0.5, @mat.shininess, DELTA)
end
end
Index: TC_FXRange.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/TC_FXRange.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TC_FXRange.rb 26 Mar 2002 21:35:20 -0000 1.3
--- TC_FXRange.rb 11 Jul 2002 13:33:15 -0000 1.4
***************
*** 33,41 ****
assert_equal([@range.width, @range.height, @range.depth].min, @range.shortest)
end
! def test_empty
end
! def test_overlap
end
! def test_contains
end
def test_include
--- 33,41 ----
assert_equal([@range.width, @range.height, @range.depth].min, @range.shortest)
end
! def test_empty?
end
! def test_overlaps?
end
! def test_contains?
end
def test_include
***************
*** 43,53 ****
def test_clipTo
end
! def test_boxCorners
end
! def test_boxIntersect
end
! def test_boxCenter
end
! def test_boxDiagonal
end
end
--- 43,53 ----
def test_clipTo
end
! def test_corners
end
! def test_intersects?
end
! def test_center
end
! def test_diagonal
end
end
Index: TC_FXViewport.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/TC_FXViewport.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TC_FXViewport.rb 26 Mar 2002 21:35:20 -0000 1.2
--- TC_FXViewport.rb 11 Jul 2002 13:33:15 -0000 1.3
***************
*** 9,17 ****
@viewport = FXViewport.new
end
def testAttributes
assert_not_nil(@viewport.w)
! assert_kind_of(Fixnum, @viewport.w)
assert_not_nil(@viewport.h)
! assert_kind_of(Fixnum, @viewport.h)
assert_not_nil(@viewport.left)
assert_kind_of(Float, @viewport.left)
--- 9,18 ----
@viewport = FXViewport.new
end
+
def testAttributes
assert_not_nil(@viewport.w)
! assert_kind_of(Integer, @viewport.w)
assert_not_nil(@viewport.h)
! assert_kind_of(Integer, @viewport.h)
assert_not_nil(@viewport.left)
assert_kind_of(Float, @viewport.left)
|