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

Function random_binary_string

unittests/common.hpp:157–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157template <size_t N> inline
158std::string random_binary_string(std::mt19937 & gen)
159{
160 std::string s(N, ' ');
161 for(auto & c : s )
162 c = static_cast<char>( std::uniform_int_distribution<int>( '0', '1' )(gen) );
163 return s;
164}
165
166// Generic struct useful for testing many serialization functions
167struct StructBase

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected