wormhole/test/random_test.cpp
nekobit f00029c5d1 Random token generation
FossilOrigin-Name: f1690870b29cf0135e60affc2547d6c5538a13efe4f0ea3e1c9687e677ad577f
2022-10-22 22:18:07 +00:00

22 lines
485 B
C++

#include <cassert>
#include <cmath>
#include <iostream>
#include "random.h"
int main()
{
Random rng{};
constexpr int start = 50;
const char sym = rng.generate_token(1)[0];
for (int i = 0; i < start; ++i)
{
std::cout << std::string((start-i), sym);
std::cout << rng.generate_token(i);
std::cout << rng.generate_token(std::abs(i));
std::cout << std::string((start-i), sym) << '\n';
}
std::cout << std::endl;
return 0;
}