test/lib/random_schema: add random_schema(schema_ptr) constructor

Allow using the convenient random data generation facilities, for any
schema.
This commit is contained in:
Botond Dénes
2025-09-17 08:56:40 +03:00
parent 4c9da11bfb
commit f10af4b5eb

View File

@@ -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;
}