make tests more syntactically conformant
All checks were successful
CMake / build (push) Successful in 50s
All checks were successful
CMake / build (push) Successful in 50s
This commit is contained in:
parent
ed0b6ed110
commit
5e75be2028
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user