kotest-assertions / io.kotest.matchers / MatcherResult / negatedFailureMessage

negatedFailureMessage

abstract fun negatedFailureMessage(): String

Returns a message indicating why the evaluation failed for when this matcher is used in the negative sense. For example, if a size matcher was used like mylist shouldNot haveSize(5) then an appropriate negated failure would be "List should not have size 5".