Rob Elliot
02/12/2021, 6:12 PMRob Elliot
02/12/2021, 6:13 PMVampire
02/12/2021, 6:52 PMYoussef Shoaib [MOD]
02/12/2021, 7:42 PMlike the power assertionsIIRC there's already a compiler plugin for that called kotlin-power-assert
Youssef Shoaib [MOD]
02/12/2021, 7:44 PMVampire
02/12/2021, 9:09 PMRob Elliot
02/13/2021, 10:29 AMSome things can never work like not declaring variables from the where block, because it is not valid Kotlin syntaxIt sort of isn’t valid groovy syntax either, is it? I thought that Spock had to rearrange the AST to allow you to declare your variables after you use them and without a
def
or a type.
Unfortunately the where
syntax (and not needing to assert in the then
block) are the things that make the tests so readable, shifting the clutter out of the way.Vampire
02/13/2021, 10:34 AMwhere
and then
syntax should probably be possible, just that you need to declare the variables as parameters.