Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-01-18 11:09:00 +0100
committerMartin Hořeňovský2023-01-18 11:55:53 +0100
commit3486f8ed9ed6a0832438bf29693626e10ad85bd4 (patch)
tree200800f39def515581bcb023ee853715a0dd5c83
parentb5be6420427331c2bf1160fa7eedf0f5f1145b6b (diff)
downloadcatch3-3486f8ed9ed6a0832438bf29693626e10ad85bd4.tar.gz
Update generator docs
-rw-r--r--docs/generators.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/generators.md b/docs/generators.md
index 7a865d43..69d1a02d 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -205,13 +205,17 @@ struct IGenerator : GeneratorUntypedBase {
// Precondition:
// The generator is either freshly constructed or the last call to next() returned true
virtual T const& get() const = 0;
+
+ // Returns user-friendly string showing the current generator element
+ // Does not have to be overridden, IGenerator provides default implementation
+ virtual std::string stringifyImpl() const;
};
```
However, to be able to use your custom generator inside `GENERATE`, it
will need to be wrapped inside a `GeneratorWrapper<T>`.
`GeneratorWrapper<T>` is a value wrapper around a
-`std::unique_ptr<IGenerator<T>>`.
+`Catch::Detail::unique_ptr<IGenerator<T>>`.
For full example of implementing your own generator, look into Catch2's
examples, specifically