case CompareType::ABS:
for (size_t i = 0; i < refSize; i++) {
float absDiff = std::abs(res[i] - ref[i]);
- ASSERT_LT(absDiff, thr1) << "Relative comparison of values ref: " << ref[i] << " and res: "
+ ASSERT_LE(absDiff, thr1) << "Relative comparison of values ref: " << ref[i] << " and res: "
<< res[i] << " , index in blobs: " << i << " failed!";
}
break;
for (size_t i = 0; i < refSize; i++) {
float absDiff = std::abs(res[i] - ref[i]);
float relDiff = absDiff / std::max(res[i], ref[i]);
- ASSERT_LT(relDiff, thr2) << "Relative comparison of values ref: " << ref[i] << " and res: "
+ ASSERT_LE(relDiff, thr2) << "Relative comparison of values ref: " << ref[i] << " and res: "
<< res[i] << " , index in blobs: " << i << " failed!";
}
break;
float absDiff = std::abs(res[i] - ref[i]);
if (absDiff > thr1) {
float relDiff = absDiff / std::max(res[i], ref[i]);
- ASSERT_LT(relDiff, thr2) << "Comparison of values ref: " << ref[i] << " and res: "
+ ASSERT_LE(relDiff, thr2) << "Comparison of values ref: " << ref[i] << " and res: "
<< res[i] << " , index in blobs: " << i << " failed!";
}
}
float absDiff = std::abs(resVal - refVal);
if (absDiff > max_diff) {
float relDiff = absDiff / std::max(res_ptr[i], ref_ptr[i]);
- ASSERT_LT(relDiff, max_diff) << "Relative comparison of values ref: " << ref_ptr[i] << " and res: "
+ ASSERT_LE(relDiff, max_diff) << "Relative comparison of values ref: " << ref_ptr[i] << " and res: "
<< res_ptr[i] << " , index in blobs: " << i << " failed!" << assertDetails;
}
}