Consider making use of kotlin-power-assert which will become part of the standard compiler plugin set (KT-63607) #3952
LeoColman
started this conversation in
6.0 changes
Replies: 3 comments 2 replies
-
Should we ask them to consider supporting other types of function names, so we could make it work with shouldBe ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Seems like functionality like this is already there: https://github.com/bnorm/kotlin-power-assert
// Kotlin DSL
configure<com.bnorm.power.PowerAssertGradleExtension> {
functions = listOf("kotlin.assert", "kotlin.test.assertTrue")
} |
Beta Was this translation helpful? Give feedback.
2 replies
-
We could fork the plugin.
…On Wed, 22 May 2024, 10:20 am twadzins, ***@***.***> wrote:
From what I see in the newly official docs
<https://kotlinlang.org/docs/power-assert.html#beyond-assert-function>,
it requires "taking a String or () -> String value as the last parameter",
which might be tricky/infeasible to make work with infix methods.
Functions like require(), check(), assertTrue(), assertEqual() and others
can also be transformed, if they have a form that allows taking a String or
() -> String value as the last parameter.
I'm hopeful that this limitation could be removed if there isn't a way to
make it work as is, since having the power assert error message feature and
still being able to use kotest assertions would be amazing.
—
Reply to this email directly, view it on GitHub
<#3952 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGRA4IPNHI43KDS54JDZDSZUPAVCNFSM6AAAAABFI57RRGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TKMRTGU2DO>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
REF
Consider making use of kotlin-power-assert which will become part of the standard compiler plugin set (KT-63607).
Beta Was this translation helpful? Give feedback.
All reactions