Support of SkipIf
andre2007 opened this issue · comments
andre2007 commented
What do you think about supporting SkipIf
struct SkipIf
{
bool delegate() b; // or just "bool b" for only allowing compile time arguments?
string reason;
}
class GetDirectionalDerivativeTest
{
mixin UnitTest;
@Test
@SkipIf(() => !platform.among("win32", "win64"), "Platform not supported")
void test_get_directional_derivative()
{
}
}
Actually there is a DIP https://github.com/dlang/DIPs/blob/master/DIPs/DIP1033.md which would allow to write it like this:
@SkipIf(!platform.among("win32", "win64"), "Current platform not supported by this FMU")
andre2007 commented
Other use case: skipping a test based on environment variables like in this python example:
andre2007 commented
Fixed