1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

modified some tests to suppress warnings

This commit is contained in:
ser1zw 2011-04-18 00:45:17 +09:00
parent 9a1d060eea
commit b6eebd4fb4
2 changed files with 4 additions and 4 deletions

View file

@ -67,9 +67,9 @@ class TestCvScalar < OpenCVTestCase
} }
mat = CvScalar.new(0.1).sub(mat, mask) mat = CvScalar.new(0.1).sub(mat, mask)
[CvMat.new(5, 5, :cv16u, 1), CvMat.new(5, 5, :cv8u, 3)].each { |mask| [CvMat.new(5, 5, :cv16u, 1), CvMat.new(5, 5, :cv8u, 3)].each { |msk|
assert_raise(TypeError) { assert_raise(TypeError) {
CvScalar.new.sub(mat, mask) CvScalar.new.sub(mat, msk)
} }
} }
end end

View file

@ -104,8 +104,8 @@ class TestPreliminary < OpenCVTestCase
} }
} }
mat = create_cvmat(2, 3, :cv16u, 3) { |j, i, c| mat = create_cvmat(2, 3, :cv16u, 3) { |j, i, cnt|
n = j + i + c n = j + i + cnt
CvScalar.new(n, n, n, 0) CvScalar.new(n, n, n, 0)
} }
assert_equal(2, mat.height) assert_equal(2, mat.height)