mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
implemented to_a to CvCircle32f, CvPoint, CvPoint2D32f, CvPoint3D32f, CvScalar, CvSize, CvSize2D32f, CvTermCriteria, CvTwoPoints, CvVector, and added tests for them
This commit is contained in:
parent
c98f5efbc9
commit
9791dae3bd
16 changed files with 41 additions and 2 deletions
|
@ -83,8 +83,11 @@ class TestCvScalar < OpenCVTestCase
|
|||
[[10, 20, 30, 40], [0.1, 0.2, 0.3, 0.4]].each { |a|
|
||||
s = CvScalar.new(*a)
|
||||
b = s.to_ary
|
||||
assert_equal(Array, b.class)
|
||||
assert_in_delta(a, b, 0.01)
|
||||
c = s.to_a # Alias
|
||||
[b, c].each { |x|
|
||||
assert_equal(Array, x.class)
|
||||
assert_in_delta(a, x, 0.01)
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue