feat(cpp-object-oriented-modular-refactoring): step 3 - foundation-google-style
This commit is contained in:
@@ -202,8 +202,8 @@ TEST(B33ReferenceComparison,
|
||||
|
||||
auto comparisonResult = fesa::test::ReferenceComparison::compare(
|
||||
results, referenceDirectory);
|
||||
ASSERT_TRUE(comparisonResult.hasValue());
|
||||
const auto& report = comparisonResult.value();
|
||||
ASSERT_TRUE(comparisonResult.HasValue());
|
||||
const auto& report = comparisonResult.Value();
|
||||
ASSERT_TRUE(report.passed);
|
||||
ASSERT_EQ(report.rows.size(), kExpectedRowCount);
|
||||
ASSERT_EQ(report.metrics.size(), kExpectedMetricCount);
|
||||
@@ -255,7 +255,7 @@ TEST(B33ReferenceComparison,
|
||||
ASSERT_TRUE(
|
||||
fesa::test::ReferenceComparison::writeDeterministicJson(
|
||||
report, comparison)
|
||||
.isOk());
|
||||
.IsOk());
|
||||
ASSERT_TRUE(std::filesystem::is_regular_file(comparison));
|
||||
const std::string json = readBytes(comparison);
|
||||
EXPECT_NE(json.find("\"stress_comparison_applicable\":false"),
|
||||
|
||||
@@ -86,10 +86,10 @@ CaseEvidence runCase(
|
||||
EXPECT_TRUE(std::filesystem::is_regular_file(results));
|
||||
auto comparisonResult = fesa::test::Mitc4ReferenceComparison::compare(
|
||||
{caseId, sourceElementType, input, csv, results});
|
||||
if (!comparisonResult.hasValue()) {
|
||||
if (!comparisonResult.HasValue()) {
|
||||
std::string diagnostics;
|
||||
for (const auto& diagnostic :
|
||||
comparisonResult.status().diagnostics()) {
|
||||
comparisonResult.GetStatus().Diagnostics()) {
|
||||
diagnostics += "\n" + diagnostic.code + ": " + diagnostic.message;
|
||||
}
|
||||
ADD_FAILURE() << "MITC4 comparison precheck failed for " << caseId
|
||||
@@ -98,8 +98,8 @@ CaseEvidence runCase(
|
||||
}
|
||||
EXPECT_TRUE(
|
||||
fesa::test::Mitc4ReferenceComparison::writeDeterministicJson(
|
||||
comparisonResult.value(), comparison)
|
||||
.isOk());
|
||||
comparisonResult.Value(), comparison)
|
||||
.IsOk());
|
||||
EXPECT_TRUE(std::filesystem::is_regular_file(comparison));
|
||||
|
||||
std::vector<std::string> generated;
|
||||
@@ -114,7 +114,7 @@ CaseEvidence runCase(
|
||||
EXPECT_TRUE(std::filesystem::is_directory(referenceDirectory));
|
||||
expectUnchanged(input, inputBefore);
|
||||
expectUnchanged(csv, csvBefore);
|
||||
return {std::move(comparisonResult.value()), comparison};
|
||||
return {std::move(comparisonResult.Value()), comparison};
|
||||
}
|
||||
|
||||
void expectCommonMetadata(
|
||||
|
||||
@@ -58,9 +58,9 @@ Status failureStatus(
|
||||
const std::string& caseId,
|
||||
const std::string& code,
|
||||
const std::string& message) {
|
||||
return Status::failure(
|
||||
FailureCategory::model,
|
||||
{{Severity::error, code, {}, "", caseId, message}});
|
||||
return Status::Failure(
|
||||
FailureCategory::kModel,
|
||||
{{Severity::kError, code, {}, "", caseId, message}});
|
||||
}
|
||||
|
||||
std::string trim(const std::string& value) {
|
||||
@@ -835,12 +835,12 @@ Result<Mitc4ComparisonReport> Mitc4ReferenceComparison::compare(
|
||||
errorNorms[component],
|
||||
worstRows[component]});
|
||||
}
|
||||
return Result<Mitc4ComparisonReport>::success(std::move(report));
|
||||
return Result<Mitc4ComparisonReport>::Success(std::move(report));
|
||||
} catch (const ComparisonFailure& exception) {
|
||||
return Result<Mitc4ComparisonReport>::failure(failureStatus(
|
||||
return Result<Mitc4ComparisonReport>::Failure(failureStatus(
|
||||
referenceCase.caseId, exception.code(), exception.what()));
|
||||
} catch (const std::exception& exception) {
|
||||
return Result<Mitc4ComparisonReport>::failure(failureStatus(
|
||||
return Result<Mitc4ComparisonReport>::Failure(failureStatus(
|
||||
referenceCase.caseId, "comparison-failure", exception.what()));
|
||||
}
|
||||
}
|
||||
@@ -936,7 +936,7 @@ Status Mitc4ReferenceComparison::writeDeterministicJson(
|
||||
"comparison-report-write-failed",
|
||||
"The deterministic MITC4 JSON report could not be completed.");
|
||||
}
|
||||
return Status::ok();
|
||||
return Status::Ok();
|
||||
} catch (const std::exception& exception) {
|
||||
return failureStatus(
|
||||
report.caseId, "comparison-report-write-failed", exception.what());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "fesa/core/status.hpp"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -501,9 +501,9 @@ private:
|
||||
void expectFailureCode(
|
||||
const fesa::Result<fesa::test::Mitc4ComparisonReport>& result,
|
||||
const std::string& code) {
|
||||
ASSERT_FALSE(result.hasValue());
|
||||
ASSERT_FALSE(result.status().diagnostics().empty());
|
||||
EXPECT_EQ(result.status().diagnostics().front().code, code);
|
||||
ASSERT_FALSE(result.HasValue());
|
||||
ASSERT_FALSE(result.GetStatus().Diagnostics().empty());
|
||||
EXPECT_EQ(result.GetStatus().Diagnostics().front().code, code);
|
||||
}
|
||||
|
||||
const fesa::test::Mitc4RowDecision* findRow(
|
||||
@@ -550,8 +550,8 @@ TEST(Mitc4ReferenceComparison, MapsTrimmedHeaderAndSixComponentsBySourceIdentity
|
||||
|
||||
auto result = fesa::test::Mitc4ReferenceComparison::compare(
|
||||
fixture.referenceCase());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
ASSERT_TRUE(report.passed);
|
||||
ASSERT_EQ(report.rows.size(), 12U);
|
||||
EXPECT_EQ(report.rows[0U].sourceNodeLabel, 1);
|
||||
@@ -676,8 +676,8 @@ TEST(Mitc4ReferenceComparison, AppliesFixedAbsoluteToleranceWithoutScaleClampOrR
|
||||
|
||||
auto result = fesa::test::Mitc4ReferenceComparison::compare(
|
||||
fixture.referenceCase());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
EXPECT_FALSE(report.passed);
|
||||
const auto* u1Zero = findRow(report, 1, "U1");
|
||||
const auto* u1Scaled = findRow(report, 2, "U1");
|
||||
@@ -717,8 +717,8 @@ TEST(Mitc4ReferenceComparison, RotationExceedanceWarnsWithoutBlockingTranslation
|
||||
|
||||
auto result = fesa::test::Mitc4ReferenceComparison::compare(
|
||||
fixture.referenceCase());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
EXPECT_TRUE(report.passed);
|
||||
ASSERT_EQ(report.warnings.size(), 1U);
|
||||
EXPECT_EQ(report.warnings[0U].code, "rotation-reference-exceedance");
|
||||
@@ -744,8 +744,8 @@ TEST(Mitc4ReferenceComparison, ReportsMetricsVectorsWorstRowAndJsonDeterministic
|
||||
|
||||
auto result = fesa::test::Mitc4ReferenceComparison::compare(
|
||||
fixture.referenceCase());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
ASSERT_TRUE(report.passed);
|
||||
ASSERT_EQ(report.metrics.size(), 6U);
|
||||
ASSERT_EQ(report.vectorMetrics.size(), 2U);
|
||||
@@ -771,11 +771,11 @@ TEST(Mitc4ReferenceComparison, ReportsMetricsVectorsWorstRowAndJsonDeterministic
|
||||
ASSERT_TRUE(
|
||||
fesa::test::Mitc4ReferenceComparison::writeDeterministicJson(
|
||||
report, jsonA)
|
||||
.isOk());
|
||||
.IsOk());
|
||||
ASSERT_TRUE(
|
||||
fesa::test::Mitc4ReferenceComparison::writeDeterministicJson(
|
||||
report, jsonB)
|
||||
.isOk());
|
||||
.IsOk());
|
||||
const std::string first = readBytes(jsonA);
|
||||
EXPECT_EQ(first, readBytes(jsonB));
|
||||
for (const char* key : {
|
||||
@@ -798,8 +798,8 @@ TEST(Mitc4ReferenceComparison, RequiresOnlyDeclaredInputCsvAndHdf5) {
|
||||
(std::vector<std::string>{"case.inp", "displacements.csv", "results.h5"}));
|
||||
auto result = fesa::test::Mitc4ReferenceComparison::compare(
|
||||
fixture.referenceCase());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
EXPECT_TRUE(result.value().passed);
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
EXPECT_TRUE(result.Value().passed);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -71,9 +71,9 @@ private:
|
||||
|
||||
Status comparisonFailureStatus(
|
||||
const std::string& code, const std::string& message) {
|
||||
return Status::failure(
|
||||
FailureCategory::model,
|
||||
{{Severity::error, code, {}, "", kModelId, message}});
|
||||
return Status::Failure(
|
||||
FailureCategory::kModel,
|
||||
{{Severity::kError, code, {}, "", kModelId, message}});
|
||||
}
|
||||
|
||||
std::string trim(const std::string& value) {
|
||||
@@ -256,17 +256,17 @@ void requireExactArtifactInventory(
|
||||
Domain readApprovedDomain(const std::filesystem::path& inputPath) {
|
||||
AbaqusInputReader reader;
|
||||
auto parsed = reader.read(inputPath);
|
||||
if (!parsed.hasValue()) {
|
||||
if (!parsed.HasValue()) {
|
||||
fail("needs-reference-artifacts", "The approved reference input cannot be parsed.");
|
||||
}
|
||||
AbaqusDomainMapper mapper;
|
||||
auto domain = mapper.map(parsed.value());
|
||||
if (!domain.hasValue()) {
|
||||
auto domain = mapper.map(parsed.Value());
|
||||
if (!domain.HasValue()) {
|
||||
fail(
|
||||
"needs-reference-artifacts",
|
||||
"The approved reference input is not the required B33 model.");
|
||||
}
|
||||
return std::move(domain.value());
|
||||
return std::move(domain.Value());
|
||||
}
|
||||
|
||||
class Hdf5Handle {
|
||||
@@ -878,9 +878,9 @@ HdfProjection readHdfProjection(
|
||||
const auto& actual = projection.nodes[node];
|
||||
const auto& expected = domain.nodes()[node];
|
||||
if (actual.internalNodeId != node ||
|
||||
actual.instanceName != expected.sourceId.instanceName ||
|
||||
actual.sourceNodeLabel != expected.sourceId.sourceLabel ||
|
||||
actual.sourceNodeLabelText != expected.sourceId.sourceLabelText ||
|
||||
actual.instanceName != expected.sourceId.instance_name ||
|
||||
actual.sourceNodeLabel != expected.sourceId.source_label ||
|
||||
actual.sourceNodeLabelText != expected.sourceId.source_label_text ||
|
||||
actual.coordinates != expected.coordinates) {
|
||||
fail("schema-mismatch", "An HDF5 node identity does not match the input.");
|
||||
}
|
||||
@@ -889,9 +889,9 @@ HdfProjection readHdfProjection(
|
||||
const auto& actual = projection.elements[element];
|
||||
const auto& expected = domain.elements()[element];
|
||||
if (actual.internalElementId != element ||
|
||||
actual.instanceName != expected.sourceId.instanceName ||
|
||||
actual.sourceElementLabel != expected.sourceId.sourceLabel ||
|
||||
actual.sourceElementLabelText != expected.sourceId.sourceLabelText ||
|
||||
actual.instanceName != expected.sourceId.instance_name ||
|
||||
actual.sourceElementLabel != expected.sourceId.source_label ||
|
||||
actual.sourceElementLabelText != expected.sourceId.source_label_text ||
|
||||
actual.nodeInternalIds[0U] != expected.nodeIndices[0U] ||
|
||||
actual.nodeInternalIds[1U] != expected.nodeIndices[1U]) {
|
||||
fail("schema-mismatch", "An HDF5 element identity does not match the input.");
|
||||
@@ -963,10 +963,10 @@ std::vector<NodeStationResultRow> normalizeStations(
|
||||
const HdfProjection& hdf,
|
||||
const ReferenceTable& sectionTable) {
|
||||
auto modelResult = AnalysisModel::create(domain);
|
||||
if (!modelResult.hasValue()) {
|
||||
if (!modelResult.HasValue()) {
|
||||
fail("schema-mismatch", "The approved input cannot create an analysis view.");
|
||||
}
|
||||
const AnalysisModel model = std::move(modelResult.value());
|
||||
const AnalysisModel model = std::move(modelResult.Value());
|
||||
const std::array<double, 4> tolerances = {
|
||||
kForceMomentFloor + kRelativeCoefficient * tableScale(sectionTable, 0U),
|
||||
kForceMomentFloor + kRelativeCoefficient * tableScale(sectionTable, 3U),
|
||||
@@ -993,15 +993,15 @@ std::vector<NodeStationResultRow> normalizeStations(
|
||||
}
|
||||
auto normalized = ResultRecovery::normalizeSectionResultantsToNodeStations(
|
||||
model, endpoints, tolerances);
|
||||
if (!normalized.hasValue()) {
|
||||
const auto& diagnostics = normalized.status().diagnostics();
|
||||
if (!normalized.HasValue()) {
|
||||
const auto& diagnostics = normalized.GetStatus().Diagnostics();
|
||||
const std::string code = diagnostics.empty() ? std::string{} : diagnostics[0U].code;
|
||||
if (code == "node-station-tolerance-failure") {
|
||||
fail("tolerance-failure", "Interior endpoint section resultants disagree.");
|
||||
}
|
||||
fail("schema-mismatch", "A node station is not eligible for legacy projection.");
|
||||
}
|
||||
return std::move(normalized.value());
|
||||
return std::move(normalized.Value());
|
||||
}
|
||||
|
||||
const NodeStationResultRow& findStation(
|
||||
@@ -1009,8 +1009,8 @@ const NodeStationResultRow& findStation(
|
||||
const HdfNode& node) {
|
||||
const auto found = std::find_if(
|
||||
stations.begin(), stations.end(), [&](const NodeStationResultRow& row) {
|
||||
return row.node.instanceName == node.instanceName &&
|
||||
row.node.sourceLabel == node.sourceNodeLabel;
|
||||
return row.node.instance_name == node.instanceName &&
|
||||
row.node.source_label == node.sourceNodeLabel;
|
||||
});
|
||||
if (found == stations.end()) {
|
||||
fail("schema-mismatch", "A projected HDF5 node station is missing.");
|
||||
@@ -1165,21 +1165,21 @@ PhysicsEvidence makePhysicsEvidence(
|
||||
const Domain& domain,
|
||||
const HdfProjection& hdf) {
|
||||
auto modelResult = AnalysisModel::create(domain);
|
||||
if (!modelResult.hasValue()) {
|
||||
if (!modelResult.HasValue()) {
|
||||
fail("schema-mismatch", "The approved input cannot create physics evidence.");
|
||||
}
|
||||
const AnalysisModel model = std::move(modelResult.value());
|
||||
const AnalysisModel model = std::move(modelResult.Value());
|
||||
auto dofsResult = DofManager::create(model);
|
||||
if (!dofsResult.hasValue()) {
|
||||
if (!dofsResult.HasValue()) {
|
||||
fail("schema-mismatch", "The approved input cannot create a DOF map.");
|
||||
}
|
||||
const DofManager dofs = std::move(dofsResult.value());
|
||||
const DofManager dofs = std::move(dofsResult.Value());
|
||||
auto loadResult = LoadAssembler::assembleFullNodalLoad(model, dofs);
|
||||
if (!loadResult.hasValue()) {
|
||||
if (!loadResult.HasValue()) {
|
||||
fail("schema-mismatch", "The approved input load cannot be assembled.");
|
||||
}
|
||||
const Vector load = std::move(loadResult.value());
|
||||
if (load.size() != hdf.reaction.size()) {
|
||||
const Vector load = std::move(loadResult.Value());
|
||||
if (load.Size() != hdf.reaction.size()) {
|
||||
fail("schema-mismatch", "The load and reaction spaces are inconsistent.");
|
||||
}
|
||||
|
||||
@@ -1407,12 +1407,12 @@ Result<ComparisonReport> ReferenceComparison::compare(
|
||||
report.stressComparisonReason =
|
||||
"Abaqus beam stress comparison is N/A; analytical/unit and HDF5 "
|
||||
"schema tests provide stress evidence.";
|
||||
return Result<ComparisonReport>::success(std::move(report));
|
||||
return Result<ComparisonReport>::Success(std::move(report));
|
||||
} catch (const ComparisonFailure& failure) {
|
||||
return Result<ComparisonReport>::failure(
|
||||
return Result<ComparisonReport>::Failure(
|
||||
comparisonFailureStatus(failure.code(), failure.what()));
|
||||
} catch (const std::exception& failure) {
|
||||
return Result<ComparisonReport>::failure(comparisonFailureStatus(
|
||||
return Result<ComparisonReport>::Failure(comparisonFailureStatus(
|
||||
"schema-mismatch", failure.what()));
|
||||
}
|
||||
}
|
||||
@@ -1422,9 +1422,9 @@ Status ReferenceComparison::writeDeterministicJson(
|
||||
const std::filesystem::path& outputJson) {
|
||||
if (outputJson.empty() || outputJson.filename().empty() ||
|
||||
!finiteReport(report)) {
|
||||
return Status::failure(
|
||||
FailureCategory::output,
|
||||
{{Severity::error,
|
||||
return Status::Failure(
|
||||
FailureCategory::kOutput,
|
||||
{{Severity::kError,
|
||||
"comparison-json-write-failure",
|
||||
{},
|
||||
"",
|
||||
@@ -1433,9 +1433,9 @@ Status ReferenceComparison::writeDeterministicJson(
|
||||
}
|
||||
std::ofstream stream{outputJson, std::ios::binary | std::ios::trunc};
|
||||
if (!stream) {
|
||||
return Status::failure(
|
||||
FailureCategory::output,
|
||||
{{Severity::error,
|
||||
return Status::Failure(
|
||||
FailureCategory::kOutput,
|
||||
{{Severity::kError,
|
||||
"comparison-json-write-failure",
|
||||
{},
|
||||
"",
|
||||
@@ -1495,16 +1495,16 @@ Status ReferenceComparison::writeDeterministicJson(
|
||||
writeJsonString(stream, report.stressComparisonReason);
|
||||
stream << ",\"passed\":" << (report.passed ? "true" : "false") << "}\n";
|
||||
if (!stream) {
|
||||
return Status::failure(
|
||||
FailureCategory::output,
|
||||
{{Severity::error,
|
||||
return Status::Failure(
|
||||
FailureCategory::kOutput,
|
||||
{{Severity::kError,
|
||||
"comparison-json-write-failure",
|
||||
{},
|
||||
"",
|
||||
kModelId,
|
||||
"The deterministic comparison JSON write failed."}});
|
||||
}
|
||||
return Status::ok();
|
||||
return Status::Ok();
|
||||
}
|
||||
|
||||
} // namespace fesa::test
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "fesa/core/status.hpp"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
@@ -214,25 +214,25 @@ void writeResultsFixture(
|
||||
const std::filesystem::path& input,
|
||||
const ComparisonValues& values) {
|
||||
auto parsedInput = fesa::AbaqusInputReader{}.read(input);
|
||||
if (!parsedInput.hasValue()) {
|
||||
if (!parsedInput.HasValue()) {
|
||||
throw std::runtime_error{"Reference fixture input identity read failed."};
|
||||
}
|
||||
auto domainResult = fesa::Domain::create(
|
||||
makeDefinition(input, parsedInput.value().sourceContentIdentity));
|
||||
if (!domainResult.hasValue()) {
|
||||
makeDefinition(input, parsedInput.Value().sourceContentIdentity));
|
||||
if (!domainResult.HasValue()) {
|
||||
throw std::runtime_error{"Reference fixture Domain construction failed."};
|
||||
}
|
||||
fesa::Domain domain = std::move(domainResult.value());
|
||||
fesa::Domain domain = std::move(domainResult.Value());
|
||||
auto modelResult = fesa::AnalysisModel::create(domain);
|
||||
if (!modelResult.hasValue()) {
|
||||
if (!modelResult.HasValue()) {
|
||||
throw std::runtime_error{"Reference fixture AnalysisModel construction failed."};
|
||||
}
|
||||
fesa::AnalysisModel model = std::move(modelResult.value());
|
||||
fesa::AnalysisModel model = std::move(modelResult.Value());
|
||||
auto dofsResult = fesa::DofManager::create(model);
|
||||
if (!dofsResult.hasValue()) {
|
||||
if (!dofsResult.HasValue()) {
|
||||
throw std::runtime_error{"Reference fixture DofManager construction failed."};
|
||||
}
|
||||
fesa::DofManager dofs = std::move(dofsResult.value());
|
||||
fesa::DofManager dofs = std::move(dofsResult.Value());
|
||||
fesa::AnalysisState state =
|
||||
fesa::AnalysisState::create(dofs, {"Step-1", 0U});
|
||||
|
||||
@@ -278,7 +278,7 @@ void writeResultsFixture(
|
||||
|
||||
fesa::Hdf5ResultsWriter writer;
|
||||
const fesa::Status status = writer.write(output, domain, state, {});
|
||||
if (!status.isOk()) {
|
||||
if (!status.IsOk()) {
|
||||
throw std::runtime_error{"Reference fixture HDF5 write failed."};
|
||||
}
|
||||
}
|
||||
@@ -330,10 +330,10 @@ private:
|
||||
void expectFailureCode(
|
||||
const fesa::Result<fesa::test::ComparisonReport>& result,
|
||||
const std::string& expectedCode) {
|
||||
ASSERT_FALSE(result.hasValue());
|
||||
ASSERT_FALSE(result.status().isOk());
|
||||
ASSERT_FALSE(result.status().diagnostics().empty());
|
||||
EXPECT_EQ(result.status().diagnostics().front().code, expectedCode);
|
||||
ASSERT_FALSE(result.HasValue());
|
||||
ASSERT_FALSE(result.GetStatus().IsOk());
|
||||
ASSERT_FALSE(result.GetStatus().Diagnostics().empty());
|
||||
EXPECT_EQ(result.GetStatus().Diagnostics().front().code, expectedCode);
|
||||
}
|
||||
|
||||
const fesa::test::RowDecision* findRow(
|
||||
@@ -557,8 +557,8 @@ TEST(ReferenceComparisonContract,
|
||||
|
||||
auto result = fesa::test::ReferenceComparison::compare(
|
||||
fixture.results(), fixture.legacy());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
EXPECT_FALSE(report.passed);
|
||||
EXPECT_EQ(report.rows.size(), kExpectedRowCount);
|
||||
EXPECT_EQ(report.metrics.size(), kExpectedMetricCount);
|
||||
@@ -608,8 +608,8 @@ TEST(ReferenceComparisonContract,
|
||||
|
||||
auto result = fesa::test::ReferenceComparison::compare(
|
||||
fixture.results(), fixture.legacy());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
ASSERT_TRUE(report.passed);
|
||||
expectExactRowInventory(report);
|
||||
ASSERT_EQ(report.metrics.size(), kExpectedMetricCount);
|
||||
@@ -658,10 +658,10 @@ TEST(ReferenceComparisonContract,
|
||||
const auto jsonB = fixture.root() / "comparison-b.json";
|
||||
ASSERT_TRUE(
|
||||
fesa::test::ReferenceComparison::writeDeterministicJson(report, jsonA)
|
||||
.isOk());
|
||||
.IsOk());
|
||||
ASSERT_TRUE(
|
||||
fesa::test::ReferenceComparison::writeDeterministicJson(report, jsonB)
|
||||
.isOk());
|
||||
.IsOk());
|
||||
const std::string first = readBytes(jsonA);
|
||||
EXPECT_EQ(first, readBytes(jsonB));
|
||||
for (const char* required : {
|
||||
@@ -690,8 +690,8 @@ TEST(ReferenceComparisonContract,
|
||||
|
||||
auto result = fesa::test::ReferenceComparison::compare(
|
||||
fixture.results(), fixture.legacy());
|
||||
ASSERT_TRUE(result.hasValue());
|
||||
const auto& report = result.value();
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
const auto& report = result.Value();
|
||||
ASSERT_TRUE(report.passed);
|
||||
EXPECT_TRUE(report.physicsEvidence.endpointConsistencyPassed);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user