The random test does not properly generate only alphanumeric values, This is my suggestion to address that issue
OK! I added the random tests, I hope my translate will be approved otherwise let me know your observations
But are they random test cases? Please look at the function for generating a random string in C++ below:
std::string random_string(size_t length) { auto randchar = []() -> char { static auto& charset = "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"; static const size_t max_index = (sizeof(charset) - 1); thread_local static std::random_device rd; thread_local static std::mt19937 rg(rd()); thread_local static std::uniform_int_distribution<int> pick(0, max_index); //return charset[rand() % max_index]; return charset[pick(rg)]; };
Completed! 👍 I added 4 new tests
Thank you for the translation to Rust. Can you please random tests as well?
Rust
Loading collection data...
The random test does not properly generate only alphanumeric values, This is my suggestion to address that issue
OK! I added the random tests, I hope my translate will be approved otherwise let me know your observations
But are they random test cases? Please look at the function for generating a random string in C++ below:
Completed! 👍 I added 4 new tests
Thank you for the translation to
Rust
.Can you please random tests as well?