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
I'd like something like ck_skip() that skips the currently running test. Usage would be:
START_TEST(foo)
{
if (!something)
ck_skip()
...
ck_assert(...)
}
END_TEST
Obviously a simple return has the same effect, but a ck_skip() macro could log/process the skipped test better, e.g. warn if a test was called multiple times but skipped every time.
I admit this is a niche use-case. I'm using check for libinput and the test suite has a slightly peculiar design. We have test uinput devices and the test suite adds each test for each matching test device. So e.g. a touchpad tapping test is called for all touchpad test devices.
But some of those devices have special run-time properties that we don't necessarily know at test setup time. So what I need is the ability to skip from within and some way to access that information afterwards. I want to check if a test was skipped for every test device, because then there's some other bug somewhere. Example again: if I test for right buttons on touchpads, I want to skip this on touchpads that don't have right buttons. But if the test always skips, I either have wrong test devices or something else is buggy.
Not 100% how this would look like from check's perspective though, but let's see if this is something wanted/possible at all. If not, that's fine, I agree that this is a bit of a special case :)
The text was updated successfully, but these errors were encountered:
I'd like something like
ck_skip()
that skips the currently running test. Usage would be:Obviously a simple
return
has the same effect, but ack_skip()
macro could log/process the skipped test better, e.g. warn if a test was called multiple times but skipped every time.I admit this is a niche use-case. I'm using check for libinput and the test suite has a slightly peculiar design. We have test uinput devices and the test suite adds each test for each matching test device. So e.g. a touchpad tapping test is called for all touchpad test devices.
But some of those devices have special run-time properties that we don't necessarily know at test setup time. So what I need is the ability to skip from within and some way to access that information afterwards. I want to check if a test was skipped for every test device, because then there's some other bug somewhere. Example again: if I test for right buttons on touchpads, I want to skip this on touchpads that don't have right buttons. But if the test always skips, I either have wrong test devices or something else is buggy.
Not 100% how this would look like from check's perspective though, but let's see if this is something wanted/possible at all. If not, that's fine, I agree that this is a bit of a special case :)
The text was updated successfully, but these errors were encountered: