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

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-10-26 20:49:56 +0200
committerMartin Hořeňovský2019-10-26 20:52:40 +0200
commit6a0822586382fcfa4bae4378b12656036850f959 (patch)
treeeea04d2a87d56e9e7f442d7e8529800a68512d8b /docs
parent4327baba400f6f8158c4d686135ba7fb6ba10d54 (diff)
downloadcatch3-6a0822586382fcfa4bae4378b12656036850f959.tar.gz
Add documentation for floating point `range` generator
Diffstat (limited to 'docs')
-rw-r--r--docs/generators.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/generators.md b/docs/generators.md
index 61276f3c..d0147d7f 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -49,7 +49,7 @@ a test case,
* 4 specific purpose generators
* `RandomIntegerGenerator<Integral>` -- generates random Integrals from range
* `RandomFloatGenerator<Float>` -- generates random Floats from range
- * `RangeGenerator<T>` -- generates all values inside a specific range
+ * `RangeGenerator<T>` -- generates all values inside an arithmetic range
* `IteratorGenerator<T>` -- copies and returns values from an iterator range
> `ChunkGenerator<T>`, `RandomIntegerGenerator<Integral>`, `RandomFloatGenerator<Float>` and `RangeGenerator<T>` were introduced in Catch 2.7.0.
@@ -69,8 +69,8 @@ type, making their usage much nicer. These are
* `map<T>(func, GeneratorWrapper<U>&&)` for `MapGenerator<T, U, Func>` (map `U` to `T`)
* `chunk(chunk-size, GeneratorWrapper<T>&&)` for `ChunkGenerator<T>`
* `random(IntegerOrFloat a, IntegerOrFloat b)` for `RandomIntegerGenerator` or `RandomFloatGenerator`
-* `range(start, end)` for `RangeGenerator<T>` with a step size of `1`
-* `range(start, end, step)` for `RangeGenerator<T>` with a custom step size
+* `range(Arithemtic start, Arithmetic end)` for `RangeGenerator<Arithmetic>` with a step size of `1`
+* `range(Arithmetic start, Arithmetic end, Arithmetic step)` for `RangeGenerator<Arithmetic>` with a custom step size
* `from_range(InputIterator from, InputIterator to)` for `IteratorGenerator<T>`
* `from_range(Container const&)` for `IteratorGenerator<T>`
@@ -78,6 +78,8 @@ type, making their usage much nicer. These are
> `from_range` has been introduced in Catch 2.10.0
+> `range()` for floating point numbers has been introduced in Catch X.Y.Z
+
And can be used as shown in the example below to create a generator
that returns 100 odd random number: