empty

object empty : Keyword(source)

Represents a helper construct which allows expressing emptiness. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function.

Samples

expect("") toBe empty

fails {
    expect("XYZ") toBe empty
}
expect(listOf(1, 2, 3)) notToBe empty

fails {
    expect(emptyList<Int>()) notToBe empty
}