Does snitch support data generators? #182
Unanswered
brendan-simon-indt
asked this question in
Q&A
Replies: 1 comment
-
Hello! You can check the comparison with Catch2 page in the docs; unfortunately the answer is no. It's not too hard to replicate if you have your own TEST_CASE("foo") {
for (const auto& value : generate_some_values()) {
CAPTURE(value);
// Test code using 'value' here...
}
} I tend to use this pattern with hard-coded lists, for example: TEST_CASE("foo") {
for (const auto value : {42, 55, 89, -5, 654, 2, 0}) {
CAPTURE(value);
// Test code using 'value' here...
}
} edit: See also this issue which tracks a request to implement generators. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does snitch support data generators?
I find using data generators very convenient for testing many variations of input scenarios.
Beta Was this translation helpful? Give feedback.
All reactions