#include "test_scaffold.h" #include #include #include "gp/pair.hpp" typedef std::mt19937_64 cheap_rand; struct pair_test : public test_scaffold { uint32_t seed; pair_test() { seed = std::random_device{}(); name = __FILE__ ":1_seed"; name += std::to_string(seed); } virtual int run() { cheap_rand setter(seed); cheap_rand getter(seed); gp::pair v{0, "zero"}; bool result = true; for(int i = 0 ; i < 100; i++) { auto a = setter(); auto b = setter(); v = gp::pair(a, std::to_string(a)); result = gp::pair(b, std::to_string(b)) == v ? result : false; } return !result; } }; append_test dummy_rsly21r43(new pair_test{});