Files
rippled/src/tests/libxrpl/crypto/csprng.cpp
Ayaz Salikhov ec44347ffc test: Use gtest instead of doctest (#6216)
This change switches over the doctest framework to the gtest framework.
2026-01-15 08:36:13 -05:00

16 lines
318 B
C++

#include <xrpl/crypto/csprng.h>
#include <gtest/gtest.h>
using namespace xrpl;
TEST(csprng, get_values)
{
auto& engine = crypto_prng();
auto rand_val = engine();
EXPECT_GE(rand_val, engine.min());
EXPECT_LE(rand_val, engine.max());
uint16_t twoByte{0};
engine(&twoByte, sizeof(uint16_t));
}