Closed andre2007 closed 3 years ago
What do you think about supporting SkipIf
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")
Other use case: skipping a test based on environment variables like in this python example:
https://github.com/CATIA-Systems/FMPy/blob/a2c62367ebf57c9bcabd6f036636588f563502d4/tests/test_fmi3.py#L10
Fixed
What do you think about supporting
SkipIf
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")