From f10af4b5ebfde732d08ae6ccd2a8ce7645e52377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Wed, 17 Sep 2025 08:56:40 +0300 Subject: [PATCH] test/lib/random_schema: add random_schema(schema_ptr) constructor Allow using the convenient random data generation facilities, for any schema. --- test/lib/random_schema.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/lib/random_schema.hh b/test/lib/random_schema.hh index 41a45cf57b..45d015aae6 100644 --- a/test/lib/random_schema.hh +++ b/test/lib/random_schema.hh @@ -178,6 +178,12 @@ public: /// make sure to honor this guarantee. random_schema(uint32_t seed, random_schema_specification& spec); + /// Create random schema object from an existing schema. + /// + /// Allows using random data generation facilities on an existing schema. + random_schema(schema_ptr schema) : _schema(std::move(schema)) { + } + schema_ptr schema() const { return _schema; }