modify tolerance policy
This commit is contained in:
@@ -122,7 +122,7 @@ void ExpectCommonMetadata(const fesa::test::Mitc4ComparisonReport& report,
|
||||
|
||||
void ExpectComparisonCoverage(const fesa::test::Mitc4ComparisonReport& report) {
|
||||
ASSERT_EQ(report.rows.size(), kNodeCount * kComponentCount);
|
||||
ASSERT_EQ(report.metrics.size(), kComponentCount);
|
||||
ASSERT_EQ(report.metrics.size(), 2U);
|
||||
ASSERT_EQ(report.vector_metrics.size(), kNodeCount);
|
||||
EXPECT_TRUE(report.passed);
|
||||
const std::size_t blocking_rows = static_cast<std::size_t>(std::count_if(
|
||||
@@ -135,12 +135,35 @@ void ExpectComparisonCoverage(const fesa::test::Mitc4ComparisonReport& report) {
|
||||
[](const fesa::test::Mitc4RowDecision& row) {
|
||||
return !row.blocking || row.within_tolerance;
|
||||
}));
|
||||
EXPECT_EQ(report.warnings.size(),
|
||||
static_cast<std::size_t>(
|
||||
std::count_if(report.rows.begin(), report.rows.end(),
|
||||
[](const fesa::test::Mitc4RowDecision& row) {
|
||||
return !row.blocking && !row.within_tolerance;
|
||||
})));
|
||||
const auto rotation_metric =
|
||||
std::find_if(report.metrics.begin(), report.metrics.end(),
|
||||
[](const fesa::test::Mitc4ComponentMetrics& metric) {
|
||||
return !metric.blocking;
|
||||
});
|
||||
ASSERT_NE(rotation_metric, report.metrics.end());
|
||||
const std::size_t row_warning_count = static_cast<std::size_t>(
|
||||
std::count_if(report.rows.begin(), report.rows.end(),
|
||||
[](const fesa::test::Mitc4RowDecision& row) {
|
||||
return !row.blocking && !row.within_tolerance;
|
||||
}));
|
||||
ASSERT_EQ(report.warnings.size(),
|
||||
row_warning_count + (rotation_metric->rms_passed ? 0U : 1U));
|
||||
std::size_t warning_index = 0U;
|
||||
for (std::size_t row_index = 0U; row_index < report.rows.size();
|
||||
++row_index) {
|
||||
const auto& row = report.rows[row_index];
|
||||
if (!row.blocking && !row.within_tolerance) {
|
||||
EXPECT_EQ(report.warnings[warning_index].code,
|
||||
"rotation-reference-exceedance");
|
||||
EXPECT_EQ(report.warnings[warning_index].row, row_index);
|
||||
++warning_index;
|
||||
}
|
||||
}
|
||||
if (!rotation_metric->rms_passed) {
|
||||
EXPECT_EQ(report.warnings[warning_index].code,
|
||||
"rotation-reference-rms-exceedance");
|
||||
EXPECT_EQ(report.warnings[warning_index].row, rotation_metric->worst_row);
|
||||
}
|
||||
}
|
||||
|
||||
// MITC4-E2E-S4-001
|
||||
|
||||
Reference in New Issue
Block a user