mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Merge pull request #468 from kirill-kornyakov:test-for-saturate-cast
This commit is contained in:
commit
7c77b402db
@ -39,4 +39,12 @@ TEST(Core_OutputArraySreate, _1997)
|
||||
Size submatSize = Size(256, 256);
|
||||
|
||||
ASSERT_NO_THROW(local::create( mat(Rect(Point(), submatSize)), submatSize, mat.type() ));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Core_SaturateCast, NegativeNotClipped)
|
||||
{
|
||||
double d = -1.0;
|
||||
unsigned int val = cv::saturate_cast<unsigned int>(d);
|
||||
|
||||
ASSERT_EQ(0xffffffff, val);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user