Predefined types for unit tests management.
More...
#include <IPSDKImage/Image/BaseImage.h>
#include <IPSDKIPL/IPSDKIPLUtility/Processor/CompareImg/CompareImg.h>
#include <UnitTest/IPSDKUnitTestTools/UnitTestMacros.h>
#include <boost/format.hpp>
Go to the source code of this file.
|
| | ipsdk |
| | Main namespace for IPSDK library.
|
| |
| | ipsdk::unittest |
| | Namespace agregating IPSDK unit test routines and classes.
|
| |
|
| #define | IPSDK_CHECK_IMG_EQUAL(pImg1, pImg2, strPrefix) |
| |
| #define | IPSDK_CHECK_IMG_EQUAL_TO_1_OR_2(pImg, pImgRef1, pImgRef2, strPrefix) |
| |
| #define | IPSDK_CHECK_IMG_CLOSE(pImg1, pImg2, pTol, strPrefix) |
| |
| #define | IPSDK_CHECK_IMG_CLOSE_TO_1_OR_2(pImg, pImgRef1, pImgRef2, pTol, strPrefix) |
| |
|
|
std::string | ipsdk::unittest::convertPixelPositionToString (const ipsdk::imaproc::attr::PixelPosition &pixPos, const image::ImageConstPtr &pImg) |
| |
|
std::string | ipsdk::unittest::convertImgComparisonTolToString (const imaproc::attr::ImgComparisonTolerance &tol) |
| |
|
BoolResult | ipsdk::unittest::convertImgComparisonResToBoolResult (const image::ImageConstPtr &pImg1, const image::ImageConstPtr &pImg2, const std::string &strPrefix, const std::string &strImg1VarName, const std::string &strImg2VarName) |
| |
|
BoolResult | ipsdk::unittest::convertImgComparison1Or2ResToBoolResult (const image::ImageConstPtr &pImg, const image::ImageConstPtr &pImgRef1, const image::ImageConstPtr &pImgRef2, const std::string &strPrefix, const std::string &strImgVarName, const std::string &strImgRef1VarName, const std::string &strImgRef2VarName) |
| |
|
BoolResult | ipsdk::unittest::convertImgComparisonResToBoolResult (const image::ImageConstPtr &pImg1, const image::ImageConstPtr &pImg2, const imaproc::attr::ImgComparisonToleranceConstPtr &pTol, const std::string &strPrefix, const std::string &strImg1VarName, const std::string &strImg2VarName) |
| |
|
BoolResult | ipsdk::unittest::convertImgComparison1Or2ResToBoolResult (const image::ImageConstPtr &pImg, const image::ImageConstPtr &pImgRef1, const image::ImageConstPtr &pImgRef2, const imaproc::attr::ImgComparisonToleranceConstPtr &pTol, const std::string &strPrefix, const std::string &strImgVarName, const std::string &strImgRef1VarName, const std::string &strImgRef2VarName) |
| |
Predefined types for unit tests management.
- Author
- H. Delestre
- Date
- 2017/05/10
- Copyright
- 2017 Reactiv'IP, all right reserved.
◆ IPSDK_CHECK_IMG_EQUAL
| #define IPSDK_CHECK_IMG_EQUAL |
( |
|
pImg1, |
|
|
|
pImg2, |
|
|
|
strPrefix |
|
) |
| |
Value:do { \
const
ipsdk::BoolResult __ipsdkInternalBRes = convertImgComparisonResToBoolResult(pImg1, pImg2, strPrefix, BOOST_PP_STRINGIZE(pImg1), BOOST_PP_STRINGIZE(pImg2)); \
IPSDK_UT_LOG_TEST_RES(strPrefix, __ipsdkInternalBRes)\
BOOST_CHECK_MESSAGE(__ipsdkInternalBRes, __ipsdkInternalBRes.getMsg()); \
} while(0)
◆ IPSDK_CHECK_IMG_EQUAL_TO_1_OR_2
| #define IPSDK_CHECK_IMG_EQUAL_TO_1_OR_2 |
( |
|
pImg, |
|
|
|
pImgRef1, |
|
|
|
pImgRef2, |
|
|
|
strPrefix |
|
) |
| |
Value:do { \
const
ipsdk::BoolResult __ipsdkInternalBRes = convertImgComparison1Or2ResToBoolResult(pImg, pImgRef1, pImgRef2, strPrefix, BOOST_PP_STRINGIZE(pImg), BOOST_PP_STRINGIZE(pImgRef1), BOOST_PP_STRINGIZE(pImgRef2)); \
IPSDK_UT_LOG_TEST_RES(strPrefix, __ipsdkInternalBRes)\
BOOST_CHECK_MESSAGE(__ipsdkInternalBRes, __ipsdkInternalBRes.getMsg()); \
} while(0)
◆ IPSDK_CHECK_IMG_CLOSE
| #define IPSDK_CHECK_IMG_CLOSE |
( |
|
pImg1, |
|
|
|
pImg2, |
|
|
|
pTol, |
|
|
|
strPrefix |
|
) |
| |
Value:do { \
const
ipsdk::BoolResult __ipsdkInternalBRes = convertImgComparisonResToBoolResult(pImg1, pImg2, pTol, strPrefix, BOOST_PP_STRINGIZE(pImg1), BOOST_PP_STRINGIZE(pImg2)); \
IPSDK_UT_LOG_TEST_RES(strPrefix, __ipsdkInternalBRes)\
BOOST_CHECK_MESSAGE(__ipsdkInternalBRes, __ipsdkInternalBRes.getMsg()); \
} while(0)
◆ IPSDK_CHECK_IMG_CLOSE_TO_1_OR_2
| #define IPSDK_CHECK_IMG_CLOSE_TO_1_OR_2 |
( |
|
pImg, |
|
|
|
pImgRef1, |
|
|
|
pImgRef2, |
|
|
|
pTol, |
|
|
|
strPrefix |
|
) |
| |
Value:do { \
const
ipsdk::BoolResult __ipsdkInternalBRes = convertImgComparison1Or2ResToBoolResult(pImg, pImgRef1, pImgRef2, pTol, strPrefix, BOOST_PP_STRINGIZE(pImg), BOOST_PP_STRINGIZE(pImgRef1), BOOST_PP_STRINGIZE(pImgRef2)); \
IPSDK_UT_LOG_TEST_RES(strPrefix, __ipsdkInternalBRes)\
BOOST_CHECK_MESSAGE(__ipsdkInternalBRes, __ipsdkInternalBRes.getMsg()); \
} while(0)