kotest-assertions / io.kotest.properties / char

char

fun Gen.Companion.char(range: CharRange, vararg ranges: CharRange): Gen<Char>
Deprecated: Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0

Returns a stream of randomly-chosen Chars. Custom characters can be generated by providing CharRanges. Distribution will be even across the ranges of Chars. For example: Gen.char('A'..'C', 'D'..'E') Ths will choose A, B, C, D, and E each 20% of the time.

fun Gen.Companion.char(ranges: List<CharRange> = CharSets.BASIC_LATIN): Gen<Char>
Deprecated: Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0

Returns a stream of randomly-chosen Chars. Custom characters can be generated by providing a list of CharRanges. Distribution will be even across the ranges of Chars. For example: Gen.char(listOf('A'..'C', 'D'..'E') Ths will choose A, B, C, D, and E each 20% of the time.

If no parameter is given, ASCII characters will be generated.