You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In hindsight I think that ParameterizedTest was kind of a mistake. I think that the concept should be merged with Test directly, with more options wrt parameter generation:
criterion would define void *const cr_param, and the symbol would be populated with the user parameter at runtime.
the Test macro would accept an additional .param parameter, with the following sub-fields:
.array would accept a global/static NULL-terminated array.
.generator would accept a user-defined generator that would be called continuously until it returns NULL.
The text was updated successfully, but these errors were encountered:
I support this change. There is one more gripe I have with ParameterizedTest which sounds to be fixed by this also: There is a fork for each parameter. I do fully understand that each Test is forked, but for ParameterizedTest criterion forks for each param, not once for the test. This is not ideal, we usually have tight tests for lots of parameters so running ParameterizedTest in one process (and sequentially) is preferred.
I'm a bit divided on that. Having each test running in its own address space makes testing a lot easier, at the cost of speed.
I'm not completely sure what a good compromise would be. I think it will depend on which implementation we go with for #204, but I think it might go like this:
A test is always run in its own process.
Users may run sub-tests within a test, and those sub-tests are run in the same process of its parent test.
Parameterized tests are just a form of sub-test.
This would simplify the API a lot (there is only one kind of top-level Test) but I think this might introduce some unnecessary boilerplate.
In hindsight I think that ParameterizedTest was kind of a mistake. I think that the concept should be merged with Test directly, with more options wrt parameter generation:
void *const cr_param
, and the symbol would be populated with the user parameter at runtime..param
parameter, with the following sub-fields:.array
would accept a global/static NULL-terminated array..generator
would accept a user-defined generator that would be called continuously until it returns NULL.The text was updated successfully, but these errors were encountered: