Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/Generators.tests.cpp
diff options
context:
space:
mode:
authorLeitwolf112026-11-15 22:29:48 +0300
committerLeitwolf112026-11-15 22:29:48 +0300
commit79f624d693b4fc3167c239c3eca47c858799333f (patch)
treed42816753aa7f421e92dceba4e4e2b264b1a4773 /tests/SelfTest/UsageTests/Generators.tests.cpp
parent6750f61c28be2861280078328e164e88bc1dfe44 (diff)
downloadcatch3-79f624d693b4fc3167c239c3eca47c858799333f.tar.gz
Bound three string and XML reads that analysis flagged
- On macOS, the path from _NSGetExecutablePath is cut at its first NUL found inside the buffer, in place of strlen, which reads until a NUL wherever it is. - The table test measures its C strings with std::string_view. - The Bazel reporter test reads the JUnit report and rejects a document type before parsing it, so no entity, external or internal, is ever expanded. Claude-Session: https://claude.ai/code/session_01Ji7xZMYjc4zankoc7hGBE1
Diffstat (limited to 'tests/SelfTest/UsageTests/Generators.tests.cpp')
-rw-r--r--tests/SelfTest/UsageTests/Generators.tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/SelfTest/UsageTests/Generators.tests.cpp b/tests/SelfTest/UsageTests/Generators.tests.cpp
index 655c4608..77ffde8d 100644
--- a/tests/SelfTest/UsageTests/Generators.tests.cpp
+++ b/tests/SelfTest/UsageTests/Generators.tests.cpp
@@ -12,7 +12,7 @@
#include <Progmasoft/Catch3/Generators/Random.hpp>
#include <Progmasoft/Catch3/Generators/Range.hpp>
-#include <cstring>
+#include <string_view>
// Generators and sections can be nested freely
@@ -62,7 +62,7 @@ TEST_CASE("tables", "[generators]") {
tuple_type{"etc...", 6}
}));
- REQUIRE(strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)));
+ REQUIRE(std::string_view(std::get<0>(data)).size() == static_cast<size_t>(std::get<1>(data)));
}