From fcda35f6458d76458826161f2499576b6ca70d54 Mon Sep 17 00:00:00 2001 From: Wim Leflere Date: Fri, 4 Oct 2019 11:22:06 +0200 Subject: [PATCH] update name of Value Generators in doc to match class names --- docs/generators.md | 12 ++++++------ include/internal/catch_generators.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/generators.md b/docs/generators.md index 0a0e2e53..490cfcac 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -36,8 +36,8 @@ Catch2's provided generator functionality consists of three parts, * `GENERATE` macro, that serves to integrate generator expression with a test case, * 2 fundamental generators - * `ValueGenerator` -- contains only single element - * `ValuesGenerator` -- contains multiple elements + * `SingleValueGenerator` -- contains only single element + * `FixedValuesGenerator` -- contains multiple elements * 5 generic generators that modify other generators * `FilterGenerator` -- filters out elements from a generator for which the predicate returns "false" @@ -56,9 +56,9 @@ a test case, The generators also have associated helper functions that infer their type, making their usage much nicer. These are -* `value(T&&)` for `ValueGenerator` -* `values(std::initializer_list)` for `ValuesGenerator` -* `table(std::initializer_list>)` for `ValuesGenerator>` +* `value(T&&)` for `SingleValueGenerator` +* `values(std::initializer_list)` for `FixedValuesGenerator` +* `table(std::initializer_list>)` for `FixedValuesGenerator>` * `filter(predicate, GeneratorWrapper&&)` for `FilterGenerator` * `take(count, GeneratorWrapper&&)` for `TakeGenerator` * `repeat(repeats, GeneratorWrapper&&)` for `RepeatGenerator` @@ -90,7 +90,7 @@ Apart from registering generators with Catch2, the `GENERATE` macro has one more purpose, and that is to provide simple way of generating trivial generators, as seen in the first example on this page, where we used it as `auto i = GENERATE(1, 2, 3);`. This usage converted each of the three -literals into a single `ValueGenerator` and then placed them all in +literals into a single `SingleValueGenerator` and then placed them all in a special generator that concatenates other generators. It can also be used with other generators as arguments, such as `auto i = GENERATE(0, 2, take(100, random(300, 3000)));`. This is useful e.g. if you know that diff --git a/include/internal/catch_generators.hpp b/include/internal/catch_generators.hpp index 883fd85b..ea575c85 100644 --- a/include/internal/catch_generators.hpp +++ b/include/internal/catch_generators.hpp @@ -71,7 +71,7 @@ namespace Generators { template class FixedValuesGenerator final : public IGenerator { static_assert(!std::is_same::value, - "ValuesGenerator does not support bools because of std::vector" + "FixedValuesGenerator does not support bools because of std::vector" "specialization, use SingleValue Generator instead."); std::vector m_values; size_t m_idx = 0;