Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
consolidationaudit2d_tests.cpp
Go to the documentation of this file.
1/**
2 * @file consolidationaudit2d_tests.cpp
3 * @brief Implements regression and invariant tests for consolidationaudit2d tests.
4 * @ingroup qpe_tests
5 *
6 * Source: @c tests/consolidationaudit2d_tests.cpp. This file is part of Quantum Phenomena Explorer (QPE),
7 * maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8 * QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9 * third-party components.
10 */
11
15
16#include <sstream>
17
18namespace qpe { namespace tests {
19
20/**
21 * @brief Runs consolidation audit2 d tests.
22 * @param errorMessage The error message value used by the operation.
23 */
24bool runConsolidationAudit2DTests(std::string &errorMessage)
25{
27 if (static_cast<int>(audit.presets.size()) != ExperimentPresetLibrary2D::count()) {
28 errorMessage = "consolidation audit did not cover every guided preset";
29 return false;
30 }
31 if (!audit.ok()) {
32 std::ostringstream stream;
33 stream << "consolidation audit reports " << audit.failCount << " failing preset(s)";
34 for (const ConsolidationPresetAudit2D &row : audit.presets) {
36 stream << "\n#" << row.presetIndex << " " << row.presetName << ": " << row.message;
37 }
38 }
39 errorMessage = stream.str();
40 return false;
41 }
42 errorMessage.clear();
43 return true;
44}
45
46} }
static ConsolidationAuditSummary2D auditGuidedPresets()
Performs audit guided presets.
static int count()
Returns count.
Declares cross-cutting static consistency checks for all guided QPE presets.
Declares regression and invariant tests for consolidationaudit2d tests.
Declares the frozen catalog of 54 guided QPE experiment presets and their representative physical sca...
bool runConsolidationAudit2DTests(std::string &errorMessage)
Runs consolidation audit2 d tests.
Data structure used by the Consolidation Audit Summary2D component.
bool ok() const noexcept
Carries out ok.
std::vector< ConsolidationPresetAudit2D > presets
Data structure used by the Consolidation Preset Audit2D component.
ConsolidationAuditStatus2D status