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

BaseTreeDumpTest

abstract class BaseTreeDumpTest

Compare a dump of a file against a saved baseline.

Parameters

printer - The node printer used to dump the trees

extension - Extension that the unparsed source file is supposed to have

Constructors

<init>

Compare a dump of a file against a saved baseline.

BaseTreeDumpTest(printer: TreeRenderer, extension: String)

Properties

extension

Extension that the unparsed source file is supposed to have

val extension: String

parser

abstract val parser: BaseParsingHelper<*, *>

printer

The node printer used to dump the trees

val printer: TreeRenderer

Functions

doTest

Executes the test. The test files are looked up using the parser. The reference test file must be named fileBaseName + ExpectedExt. The source file to parse must be named fileBaseName + extension.

fun doTest(fileBaseName: String): Unit

Companion Object Properties

ExpectedExt

const val ExpectedExt: String

Companion Object Functions

normalize

fun String.normalize(): String