make tests more syntactically conformant
All checks were successful
CMake / build (push) Successful in 50s

This commit is contained in:
Greg Gauthier 2025-09-05 12:51:09 +01:00
parent ed0b6ed110
commit 5e75be2028

View File

@ -5,9 +5,7 @@
#include <cassert>
void test_random_string_length() {
const int lengths[] = {0, 1, 10, 32, 100};
for (auto length : lengths) {
for (const int lengths[] = {0, 1, 10, 32, 100}; const auto length : lengths) {
std::string result = random_string(length, false);
assert(result.length() == length);
@ -18,7 +16,7 @@ void test_random_string_length() {
}
void test_alphanumeric_only() {
std::regex alphanumeric_only("^[a-zA-Z0-9]*$");
const std::regex alphanumeric_only("^[a-zA-Z0-9]*$");
for (int i = 0; i < 10; i++) {
std::string result = random_string(20, false);