SemanticsMatcher


Wrapper for semantics matcher lambdas that allows to build string explaining to the developer what conditions were being tested.

Summary

Public companion functions

SemanticsMatcher
<T : Any?> expectValue(key: SemanticsPropertyKey<T>, expectedValue: T)

Builds a predicate that tests whether the value of the given key is equal to expectedValue.

Cmn
SemanticsMatcher

Builds a predicate that tests whether the given key is defined in semantics.

Cmn
SemanticsMatcher

Builds a predicate that tests whether the given key is NOT defined in semantics.

Cmn

Public constructors

SemanticsMatcher(description: String, matcher: (SemanticsNode) -> Boolean)
Cmn

Public functions

infix SemanticsMatcher
Cmn
Boolean

Returns whether the given node is matched by this matcher.

Cmn
Boolean

Returns whether at least one of the given nodes is matched by this matcher.

Cmn
operator SemanticsMatcher
not()
Cmn
infix SemanticsMatcher
Cmn

Public properties

String
Cmn

Public companion functions

expectValue

fun <T : Any?> expectValue(key: SemanticsPropertyKey<T>, expectedValue: T): SemanticsMatcher

Builds a predicate that tests whether the value of the given key is equal to expectedValue.

keyIsDefined

fun <T : Any?> keyIsDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher

Builds a predicate that tests whether the given key is defined in semantics.

keyNotDefined

fun <T : Any?> keyNotDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher

Builds a predicate that tests whether the given key is NOT defined in semantics.

Public constructors

SemanticsMatcher

SemanticsMatcher(description: String, matcher: (SemanticsNode) -> Boolean)

Public functions

and

infix fun and(other: SemanticsMatcher): SemanticsMatcher

matches

fun matches(node: SemanticsNode): Boolean

Returns whether the given node is matched by this matcher.

matchesAny

fun matchesAny(nodes: Iterable<SemanticsNode>): Boolean

Returns whether at least one of the given nodes is matched by this matcher.

not

operator fun not(): SemanticsMatcher

or

infix fun or(other: SemanticsMatcher): SemanticsMatcher

Public properties

description

val descriptionString