fix(test): assert the derived mean is positive, not unsigned >= 0

The gcc debug-coverage job failed where clang, macos and windows passed:
gcc's -Werror=type-limits rejects comparing an unsigned expression against
zero with >=, because it is always true.

The assertion was vacuous anyway. Both operands are unsigned, so the check
proved nothing, while the comment beside it says the intent was a non-zero
microsecond figure. Now asserts strictly positive, which is what it meant.

The same job also logs a CMake LTO capability probe failing on a missing
compiler-ar and prints the code-generation guard's echo line; neither is
related to this branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-07-27 16:49:21 +01:00
parent 2d36baf836
commit 445e20f057

View File

@@ -604,7 +604,9 @@ public:
// A mean derived the way the telemetry gauge derives it must be a
// sane, non-zero microsecond figure rather than a division artifact.
BEAST_EXPECT(dest->getStoreDurationUs() / dest->getStoreCount() >= 0);
// Asserted as strictly positive: both operands are unsigned, so a
// >= 0 check would be vacuously true and gcc rejects it outright.
BEAST_EXPECT(dest->getStoreDurationUs() / dest->getStoreCount() > 0);
}
//--------------------------------------------------------------------------