fix(comments): correct canary justification and expand failure guidance in padding tests
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
// string threading (Phase V, V1 leading-zero fidelity). No REAPER, no framework.
|
||||
//
|
||||
// WHY THIS EXECUTABLE EXISTS: test_app_version.cpp pins stampVersion() relative to the
|
||||
// live configure_file'd version string — but a live-version assertion can only DETECT a
|
||||
// "reconstruct the string from numeric components" regression when the live version
|
||||
// happens to be zero-padded. "0.9.01" reconstructed via integers renders "0.9.1" and
|
||||
// trips it; "0.9.8" reconstructs to itself, so at an unpadded version the check passes
|
||||
// whether or not the code regressed — the guard silently goes vacuous while green.
|
||||
// live configure_file'd version string — but a relative assertion (e.g. appVersion() ==
|
||||
// stampVersion()) is version-shape-blind: it holds whether the string was threaded
|
||||
// verbatim or reconstructed from numeric components, at any version, padded or not.
|
||||
// The live suite therefore cannot detect a reconstruct-from-components regression at all.
|
||||
// Padded and unpadded versions are both legitimate (Daniel's ruling), so the guard must
|
||||
// not depend on the shipped version's shape.
|
||||
//
|
||||
@@ -67,9 +66,11 @@ static void testCanaryFixtureIsNonVacuous() {
|
||||
std::to_string(wv.parsed.major) + "." +
|
||||
std::to_string(wv.parsed.minor) + "." +
|
||||
std::to_string(wv.parsed.patch);
|
||||
// If this fails, the fixture is unpadded and the canary guards nothing.
|
||||
// Restore a zero-padded fixture (e.g. "0.9.01") in CMakeLists.txt and
|
||||
// update the matching literals in this file.
|
||||
// If this fails, one of two causes: (1) the fixture was changed to an unpadded form
|
||||
// (e.g. "0.9.1") — restore a zero-padded fixture (e.g. "0.9.01") in CMakeLists.txt
|
||||
// and update the matching literals in this file; or (2) the fixture is still padded
|
||||
// but app_version.cpp regressed to parse-and-reprint — in that case
|
||||
// testPaddedVersionSurvivesThreadingVerbatim also fails, pointing at the real cause.
|
||||
CHECK(reprinted != stampVersion());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user