mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
added error handling to some methods (2)
Added error handlings to the methods of following classes or modules -CvPoint2D32f -CvPoint3D32f -CvRect -CvScalar -CvSeq -CvSize -CvSize2D32f -CvSlice -CvSURFParams -CvSURFPoint -CvTermCriteria -CvTwoPoints -CvUtils -CvVideoWriter -GUI -IplConvKernel -IplImage -MouseEvent -OpenCV -Trackbar -Window
This commit is contained in:
parent
ea55e0d42e
commit
b3016fc68c
31 changed files with 407 additions and 245 deletions
|
@ -74,12 +74,18 @@ class TestCvRect < OpenCVTestCase
|
|||
assert_equal(30, rect.width)
|
||||
assert_equal(40, rect.height)
|
||||
|
||||
assert_raise(TypeError) {
|
||||
CvRect.new(DUMMY_OBJ)
|
||||
}
|
||||
assert_raise(ArgumentError) {
|
||||
CvRect.new('string')
|
||||
CvRect.new(1, 2)
|
||||
}
|
||||
assert_raise(ArgumentError) {
|
||||
CvRect.new(1, 2, 3)
|
||||
}
|
||||
assert_raise(ArgumentError) {
|
||||
CvRect.new(1, 2, 3, 4, 5)
|
||||
}
|
||||
end
|
||||
|
||||
def test_center
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue