Closed CLOVIS-AI closed 1 month ago
Hi @CLOVIS-AI! Thanks for raising this issue. We are now working on a new API for Lincheck.
Meanwhile, I would suggest leveraging inheritance to avoid code duplication -- take a look at how we test different channels in Kotlin coroutines: https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/test/lincheck/ChannelsLincheckTest.kt#L18
Thanks. Is there a place to follow the work on the new API? I'd like to follow development, if possible.
@CLOVIS-AI, we will create an issue with the API design when we have a preliminary version.
Instead of writing
I would prefer to write
(or a similar DSL).
The usage of a DSL would:
My main use-case is that I have multiple cache algorithms. They all have a common interface, and all have the exact same operations. I want to test all of them with Lincheck. With this DSL implemented, and using a DSL-based test framework (Prepared in this example):
Currently, without this feature, the only way is to duplicate the entire test class for each implementation.