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-27 09:17:15 +0100
committerGitHub2019-10-27 09:17:15 +0100
commit9a558171d836cf7b292883b6f65bdd937c30cc76 (patch)
tree93b5af6d1abc58522f38b539e58d95ee0bbe24c1 /docs
parentc5c688820c919e202304b885df1c5a920ff7eb4e (diff)
parent6a0822586382fcfa4bae4378b12656036850f959 (diff)
downloadcatch3-9a558171d836cf7b292883b6f65bdd937c30cc76.tar.gz
Merge pull request #1776 from mvd4/bugfix/enable-floating-point-ranges
Enable floating point ranges
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: