Ψ-W3 remediation: fix the verify doc's wrong render source, add missing content checks, soften unverified claims
Corrected the Render-dialog source name the refusal's evidence depends on, added a by-ear content check and a file-size channel proxy, and stopped two comments from overclaiming.
This commit is contained in:
@@ -297,6 +297,22 @@ static void testRefusalMessagesAreSiblingsWithDistinctExits() {
|
||||
CHECK(track.find("selected items") == std::string::npos);
|
||||
}
|
||||
|
||||
// Golden literals: docs/verify-track-scope-multitrack.md §2 quotes the track message as
|
||||
// an exact console match. A substring check alone leaves that doc free to drift from
|
||||
// whatever ships, so pin both strings byte-for-byte here.
|
||||
static void testRefusalMessagesMatchGoldenLiterals() {
|
||||
CHECK(multiTrackRefusalMessage(CaptureScope::Item) ==
|
||||
"This range is narrower than the selected items, so it renders "
|
||||
"through their tracks -- and those items span more than one track, "
|
||||
"which this shape cannot land as a single file. Capture one track's "
|
||||
"items at a time, or make the range match the items' extent.");
|
||||
CHECK(multiTrackRefusalMessage(CaptureScope::Track) ==
|
||||
"A track capture renders the selected tracks through the master, "
|
||||
"and more than one track cannot land as a single file. Capture one "
|
||||
"track at a time, or route them into a folder/bus track and capture "
|
||||
"that (a folder's own output is its children summed).");
|
||||
}
|
||||
|
||||
// --- inferRangeSource: razor-else-time (orthogonal to scope) -----------------
|
||||
|
||||
static void testRangeInference() {
|
||||
@@ -396,6 +412,7 @@ int main() {
|
||||
testRangedItemScopeRendersTimeBounded();
|
||||
testMultiTrackStemRenderIsNamedForRefusal();
|
||||
testRefusalMessagesAreSiblingsWithDistinctExits();
|
||||
testRefusalMessagesMatchGoldenLiterals();
|
||||
testRangeInference();
|
||||
testItemScopeBypassesEverythingButTake();
|
||||
testTrackScopeKeepsSelfBypassesAncestorsAndMaster();
|
||||
|
||||
@@ -779,7 +779,9 @@ static void testCollapsePreservesQuietNaNBitPattern() {
|
||||
// identically to "the channels differ" — a stereo file landing under a plain Ok. The
|
||||
// report is where they must part: Declined stays silent (a capture with nothing to
|
||||
// collapse reads as it always did), and the other two say different things.
|
||||
static void testCollapseOutcomesReportDistinctly() {
|
||||
// Pins the three suffix STRINGS, not user-observable behavior — see wav_codec.h's
|
||||
// monoCollapseSuffix doc: this text reaches no one on a successful capture.
|
||||
static void testCollapseOutcomeSuffixesAreDistinctStrings() {
|
||||
const std::string declined = monoCollapseSuffix(MonoCollapseOutcome::Declined);
|
||||
const std::string collapsed = monoCollapseSuffix(MonoCollapseOutcome::Collapsed);
|
||||
const std::string failed = monoCollapseSuffix(MonoCollapseOutcome::Failed);
|
||||
@@ -828,7 +830,7 @@ int main() {
|
||||
testCollapseDeclinesOnUnparseableBytes();
|
||||
testCollapseChangesContentHash();
|
||||
testCollapsePreservesQuietNaNBitPattern();
|
||||
testCollapseOutcomesReportDistinctly();
|
||||
testCollapseOutcomeSuffixesAreDistinctStrings();
|
||||
|
||||
if (g_fail == 0) std::printf("wav_codec: all tests passed\n");
|
||||
else std::printf("wav_codec: %d CHECK(s) FAILED\n", g_fail);
|
||||
|
||||
Reference in New Issue
Block a user