framework. I have 4 tests that should have different behaviours when running on Windows and Unix. Is there something available in
kotlin.test
that I could use to skip the test if, e.g, running on Windows? Maybe something like JUnit's
assumeThat
. That way I could transform these 4 tests into 8 tests, 4 for each platform. 😊 Thanks!
h
hfhbd
06/23/2025, 9:08 PM
You can use expect/actual to define a platform constant that can be used in @Ignore. Or just move the platform specific tests into the platform specific test folder.
gratitude thank you 1
hfhbd
06/23/2025, 9:08 PM
Or only the platform validation logic.
gratitude thank you 1
p
Paulo Cereda
06/23/2025, 9:16 PM
Thanks @hfhbd! My original code had a
System.getProperty("os.name")
check that helped me choose different paths for Windows and Unix (e.g,