https://kotlinlang.org logo
#kotest
Title
# kotest
l

Luke

01/14/2022, 9:54 PM
In the assertion library, we have access to both:
Copy code
infix fun <A : CharSequence> A?.shouldMatch(regex: String): A
infix fun <A : CharSequence> A?.shouldMatch(regex: Regex): A
Is there a reason for having only the negation for the String parameter?
l

LeoColman

01/15/2022, 7:35 PM
What do you mean? There isn't any
A?.shouldNotMatch(regex: String)
?
If that's the case there is no reason to not have it other than we've forgotten. Feel free to create a ticket 😄
l

Luke

01/17/2022, 2:16 PM
There is
fun <A : CharSequence> A?.shouldNotMatch(regex: String): A
, but not
fun <A : CharSequence> A?.shouldNotMatch(regex: Regex): A
. On version 5.0.3 at least
l

LeoColman

01/17/2022, 6:18 PM
Yeah, we forgot it. Could you you create a ticket with this information, please? 😄
4 Views