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
There should be RUN_SUITE1/RUN_SUITEp macros for suites that take argument(s), such as a random number seed, verbosity setting, or iteration limit.
Because the existing syntax for defining/calling suites is SUITE(suitename), this will be a breaking API change.
/* previous style */
SUITE(suite);
/* new style */
SUITE suite(void);
SUITE suite1(void *some_arg);
SUITE suite_multi(size_t apple, void *banana, int carrot);
SUITE suite(void) {}
RUN_SUITE(suite); /* no change */
RUN_SUITE1(suite1, arg); /* suite with 1 argument */
/* suite with multiple arguments (C99 and later standards only) */
RUN_SUITEp(suite_multi, 1, NULL, 2);
The text was updated successfully, but these errors were encountered:
Would this pass the argument to a suite? Is it possible to have something like this that passes the arguments to every test? I am thinking of a setup/teardown configuration for every test in a suite.
It would pass an argument to the suite, which could pass it to any test(s) that need it. You can already pass arguments to tests, and there are already setup/teardown hooks, which once set will be called around all the following tests in the suite.
Functionally, it's not a complicated change, but it will be a breaking change to a long-stable interface, so I want to be very thoughtful of the new interface and wait until a new major release to merge it.
There should be
RUN_SUITE1
/RUN_SUITEp
macros for suites that take argument(s), such as a random number seed, verbosity setting, or iteration limit.Because the existing syntax for defining/calling suites is
SUITE(suitename)
, this will be a breaking API change.The text was updated successfully, but these errors were encountered: