MCPcopy Create free account
hub / github.com/USCiLab/cereal / random_basic_string

Function random_basic_string

unittests/common.hpp:148–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148template<class C> inline
149std::basic_string<C> random_basic_string(std::mt19937 & gen)
150{
151 std::basic_string<C> s(std::uniform_int_distribution<int>(3, 30)(gen), ' ');
152 for(C & c : s)
153 c = static_cast<C>( std::uniform_int_distribution<int>( 'A', 'Z' )(gen) );
154 return s;
155}
156
157template <size_t N> inline
158std::string random_binary_string(std::mt19937 & gen)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected