Update of /cvsroot/fxruby/FXRuby/tests
In directory usw-pr-cvs1:/tmp/cvs-serv25300/tests
Modified Files:
Tag: release10
TC_FXHMat.rb TC_FXHVec.rb TC_FXRegion.rb stress1.rb
Log Message:
Updates to test cases TC_FXHVec.rb and TC_FXHMat.rb to test the new clone
instance methods for these classes.
Added support for overloaded FXRegion#contains? and a new test case for
this class.
Index: TC_FXHMat.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/TC_FXHMat.rb,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** TC_FXHMat.rb 26 Mar 2002 21:35:20 -0000 1.2
--- TC_FXHMat.rb 8 May 2002 21:43:44 -0000 1.2.2.1
***************
*** 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.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** TC_FXHVec.rb 26 Mar 2002 21:35:20 -0000 1.4
--- TC_FXHVec.rb 8 May 2002 21:43:44 -0000 1.4.2.1
***************
*** 83,85 ****
--- 83,89 ----
assert_equal(vec[3], arr[3])
end
+ def test_clone
+ vec1 = FXHVec.new(1.0, 2.0, 3.0, 4.0)
+ assert_equal(vec1, vec1.clone)
+ end
end
Index: TC_FXRegion.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/Attic/TC_FXRegion.rb,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** TC_FXRegion.rb 8 May 2002 21:29:44 -0000 1.1.2.1
--- TC_FXRegion.rb 8 May 2002 21:43:44 -0000 1.1.2.2
***************
*** 19,37 ****
def test_containsPoint
# Definitely out of bounds
! assert(!@region.containsPoint?(2, 3))
# Definitely in bounds
! assert(@region.containsPoint?(6, 6))
# Check corners too
! assert(@region.containsPoint?(5, 5))
! assert(@region.containsPoint?(5, 15))
! assert(@region.containsPoint?(15, 15))
! assert(@region.containsPoint?(15, 5))
end
def test_containsRectangle
! assert(!@region.containsRectangle?(2, 3, 15, 15))
! assert(@region.containsRectangle?(5, 5, 10, 10))
! assert(@region.containsRectangle?(6, 6, 5, 5))
end
def test_bounds
--- 19,37 ----
def test_containsPoint
# Definitely out of bounds
! assert(!@region.contains?(2, 3))
# Definitely in bounds
! assert(@region.contains?(6, 6))
# Check corners too
! assert(@region.contains?(5, 5))
! assert(@region.contains?(5, 14))
! assert(@region.contains?(14, 14))
! assert(@region.contains?(14, 5))
end
def test_containsRectangle
! assert(@region.contains?(2, 3, 15, 15)) # why doesn't this fail?
! assert(@region.contains?(5, 5, 10, 10))
! assert(@region.contains?(6, 6, 5, 5))
end
def test_bounds
Index: stress1.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/tests/Attic/stress1.rb,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** stress1.rb 25 Apr 2002 15:34:41 -0000 1.1.2.1
--- stress1.rb 8 May 2002 21:43:44 -0000 1.1.2.2
***************
*** 54,58 ****
FXMAPFUNC(SEL_TIMEOUT, ID_TIMER, "onCount")
! disableThreads
init(ARGV)
--- 54,58 ----
FXMAPFUNC(SEL_TIMEOUT, ID_TIMER, "onCount")
! self.threadsEnabled = false
init(ARGV)
|