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

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

Types

Assertions

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

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

BaseNodeAttributePrinter

Base attribute printer, subclass to filter attributes.

open class BaseNodeAttributePrinter : TextTreeRenderer

BaseParsingHelper

Language-independent base for a parser utils class. Implementations are language-specific.

abstract class BaseParsingHelper<Self : BaseParsingHelper<Self, T>, T : RootNode>

BaseTreeDumpTest

Compare a dump of an AST against a saved baseline.

abstract class BaseTreeDumpTest : BaseTextComparisonTest

NodeSpec

A subtree matcher written in the DSL documented on TreeNodeWrapper.

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

NodeTreeLikeAdapter

An adapter for baseShouldMatchSubtree.

object NodeTreeLikeAdapter : DoublyLinkedTreeLikeAdapter<Node>

RelevantAttributePrinter

open class RelevantAttributePrinter : BaseNodeAttributePrinter

Extensions for External Classes

kotlin.reflect.KCallable

net.sourceforge.pmd.lang.ast.Node

Properties

SimpleNodePrinter

Prints just the structure, like so:

val SimpleNodePrinter: TextTreeRenderer

Functions

matchNode

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

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