diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-06-14 11:31:52 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-06-14 11:31:52 +0200 |
commit | 12350d3ac7a1192407b0f920bd937d4f753ec118 (patch) | |
tree | faf2b14400a9206f76272a4f7721153c1dbe3899 /test/geo_alignedbox.cpp | |
parent | bcc0f38f981f8efadeba314fb41e58f911c60ccc (diff) |
Add unit test for AlignedBox::center
Diffstat (limited to 'test/geo_alignedbox.cpp')
-rw-r--r-- | test/geo_alignedbox.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp index 2bdb4b7f2..ba3378aab 100644 --- a/test/geo_alignedbox.cpp +++ b/test/geo_alignedbox.cpp @@ -48,6 +48,8 @@ template<typename BoxType> void alignedbox(const BoxType& _box) b0.extend(p0); b0.extend(p1); VERIFY(b0.contains(p0*s1+(Scalar(1)-s1)*p1)); + VERIFY(b0.contains(b0.center())); + VERIFY(b0.center()==(p0+p1)/Scalar(2)); (b2 = b0).extend(b1); VERIFY(b2.contains(b0)); |