PowerAssertions are a really useful feature of the groovy programming language, as they give you the full information on what is not as it is expected in the error message - the full assert statement with all information about the values.
However, when running CPS transformed, the output is less useful, as it only states what the assertion was that failed, without the values.
Take for example the following pipeline script:
Although the code is the same for NonCPS and with CPS,
NonCPS prints the following:
(I.e. the value of the whole expression and the value of b,
while the CPS transformed version prints no information whatsoever:
N.B.: running the same code in a groovysh actually gives even more information:
That one can be worked around by liberally throwing parentheses at the problem, but that again only works in the NonCPS case:
This makes the assert statement almost useless for writing test jobs for your global library methods, so it would be a really nice addition if the information could be preserved and be added to the message of the PowerAssertionError.