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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/generators
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-05-16 11:56:11 +0200
committerMartin Hořeňovský2022-05-16 11:56:21 +0200
commitaf8b54ecd59f8174aaaa97682e3544f2820a0900 (patch)
tree1e9738c570b986822c235917ef20afc5ecb89017 /src/catch2/generators
parent07bec74096d91e68efa97587554004740d9aa32a (diff)
downloadcatch3-af8b54ecd59f8174aaaa97682e3544f2820a0900.tar.gz
Generators now keep track of the index of current element
This might become potentially useful in the future, when we want to provide the ability to forward jump generators, to be able to simply reproduce specific input to a test. I am not yet sure how it would work, but the basic idea is that it could be similar to the `-c` switch for selecting specific `SECTION` in a test case.
Diffstat (limited to 'src/catch2/generators')
-rw-r--r--src/catch2/generators/catch_generators.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/generators/catch_generators.hpp b/src/catch2/generators/catch_generators.hpp
index acfdb7dc..24af63d6 100644
--- a/src/catch2/generators/catch_generators.hpp
+++ b/src/catch2/generators/catch_generators.hpp
@@ -64,7 +64,7 @@ namespace Detail {
return m_generator->get();
}
bool next() {
- return m_generator->next();
+ return m_generator->countedNext();
}
};