pmd-lang-test / net.sourceforge.pmd.lang.ast.test

Package net.sourceforge.pmd.lang.ast.test

Types

NodeTreeLikeAdapter

object NodeTreeLikeAdapter : TreeLikeAdapter<Node>

An adapter for baseShouldMatchSubtree.

Type Aliases

Assertions

typealias Assertions<M> = (M) -> Unit

A function feedable to io.kotlintest.should, which fails the test if an AssertionError is thrown.

NodeSpec

typealias NodeSpec<N> = TreeNodeWrapper<Node, N>.() -> Unit

A subtree matcher written in the DSL documented on TreeNodeWrapper.

Extensions for External Classes

kotlin.reflect.KCallable

net.sourceforge.pmd.lang.ast.Node

Functions

matchNode

fun <N : Node> matchNode(ignoreChildren: Boolean = false, nodeSpec: NodeSpec<N>): Assertions<Node?>

Returns an assertion function asserting that its parameter conforms to the given NodeSpec.