pmd-lang-test
Module Contents
package
net.sourceforge.pmd.cpd.test
Module Contents
abstract
class
CpdTextComparisonTest
:
BaseTextComparisonTest
Module Contents
CpdTextComparisonTest
(
extensionIncludingDot
:
String
)
open
fun
defaultProperties
(
)
:
Properties
@JvmOverloads
fun
doTest
(
fileBaseName
:
String
,
expectedSuffix
:
String
=
""
,
properties
:
Properties
=
defaultProperties()
)
:
Unit
@JvmOverloads
fun
expectTokenMgrError
(
source
:
String
,
properties
:
Properties
=
defaultProperties()
)
:
TokenMgrError
protected
open
val
extensionIncludingDot
:
String
abstract
fun
newTokenizer
(
properties
:
Properties
)
:
Tokenizer
protected
open
val
resourceLoader
:
Class
<
*
>
protected
open
val
resourcePrefix
:
String
fun
sourceCodeOf
(
str
:
String
)
:
SourceCode
fun
tokenize
(
tokenizer
:
Tokenizer
,
str
:
String
)
:
Tokens
package
net.sourceforge.pmd.lang.ast.test
Module Contents
typealias
Assertions
<
M
>
=
(
M
)
->
Unit
open
class
BaseNodeAttributePrinter
:
TextTreeRenderer
Module Contents
BaseNodeAttributePrinter
(
)
protected
open
fun
appendNodeInfoLn
(
out
:
Appendable
,
node
:
Node
)
:
Unit
protected
open
fun
ignoreAttribute
(
node
:
Node
,
attribute
:
Attribute
)
:
Boolean
protected
open
fun
valueToString
(
value
:
Any
?
)
:
String
?
abstract
class
BaseParsingHelper
<
Self
:
BaseParsingHelper
<
Self
,
T
>
,
T
:
RootNode
>
Module Contents
BaseParsingHelper
(
langName
:
String
,
rootClass
:
Class
<
T
>
,
params
:
Params
)
protected
abstract
fun
clone
(
params
:
Params
)
:
Self
val
defaultHandler
:
LanguageVersionHandler
val
defaultVersion
:
LanguageVersion
fun
getHandler
(
version
:
String
)
:
LanguageVersionHandler
@JvmOverloads
fun
<
R
:
Node
>
getNodes
(
target
:
Class
<
R
>
,
source
:
String
,
version
:
String
?
=
null
)
:
List
<
R
>
fun
getVersion
(
version
:
String
?
)
:
LanguageVersion
protected
val
langName
:
String
data
class
Params
Module Contents
Params
(
doProcess
:
Boolean
,
defaultVerString
:
String
?
,
resourceLoader
:
Class
<
*
>
?
,
resourcePrefix
:
String
,
parserOptions
:
ParserOptions
?
=
null
)
@JvmStatic
val
defaultNoProcess
:
Params
@JvmStatic
val
defaultProcess
:
Params
val
defaultVerString
:
String
?
val
doProcess
:
Boolean
val
parserOptions
:
ParserOptions
?
val
resourceLoader
:
Class
<
*
>
?
val
resourcePrefix
:
String
protected
val
params
:
Params
@JvmOverloads
open
fun
parse
(
sourceCode
:
String
,
version
:
String
?
=
null
)
:
T
@JvmOverloads
open
fun
parseClass
(
clazz
:
Class
<
*
>
,
version
:
String
?
=
null
)
:
T
@JvmOverloads
open
fun
parseResource
(
resource
:
String
,
version
:
String
?
=
null
)
:
T
protected
fun
readResource
(
resourceName
:
String
)
:
String
fun
withDefaultVersion
(
version
:
String
?
)
:
Self
fun
withParserOptions
(
parserOptions
:
ParserOptions
?
)
:
Self
@JvmOverloads
fun
withResourceContext
(
contextClass
:
Class
<
*
>
,
resourcePrefix
:
String
=
""
)
:
Self
abstract
class
BaseTreeDumpTest
:
BaseTextComparisonTest
Module Contents
BaseTreeDumpTest
(
printer
:
TreeRenderer
,
extensionIncludingDot
:
String
)
fun
doTest
(
fileBaseName
:
String
)
:
Unit
protected
open
val
extensionIncludingDot
:
String
abstract
val
parser
:
BaseParsingHelper
<
*
,
*
>
protected
open
val
resourceLoader
:
Class
<
*
>
protected
open
val
resourcePrefix
:
String
kotlin.reflect.KCallable
Module Contents
infix
fun
<
N
,
V
:
N
>
KCallable
<
N
>
.
shouldBe
(
expected
:
V
?
)
:
Unit
infix
fun
<
N
,
V
:
N
>
KCallable
<
N
>
.
shouldEqual
(
expected
:
V
?
)
:
Unit
infix
fun
<
T
>
KCallable
<
T
>
.
shouldMatch
(
expected
:
T
.
(
)
->
Unit
)
:
Unit
inline
fun
<
reified
N
:
Node
>
matchNode
(
ignoreChildren
:
Boolean
=
false
,
noinline
nodeSpec
:
NodeSpec
<
N
>
)
:
Assertions
<
Node
?
>
net.sourceforge.pmd.lang.ast.Node
Module Contents
fun
Node
.
safeGetChild
(
i
:
Int
)
:
Node
?
inline
fun
<
reified
N
:
Node
>
Node
?
.
shouldMatchNode
(
ignoreChildren
:
Boolean
=
false
,
noinline
nodeSpec
:
NodeSpec
<
N
>
)
:
Unit
typealias
NodeSpec
<
N
>
=
TreeNodeWrapper
<
Node
,
N
>
.
(
)
->
Unit
object
NodeTreeLikeAdapter
:
DoublyLinkedTreeLikeAdapter
<
Node
>
Module Contents
fun
getChild
(
node
:
Node
,
index
:
Int
)
:
Node
?
fun
getChildren
(
node
:
Node
)
:
List
<
Node
>
fun
getParent
(
node
:
Node
)
:
Node
?
fun
nodeName
(
type
:
Class
<
out
Node
>
)
:
String
open
class
RelevantAttributePrinter
:
BaseNodeAttributePrinter
Module Contents
RelevantAttributePrinter
(
)
protected
open
fun
ignoreAttribute
(
node
:
Node
,
attribute
:
Attribute
)
:
Boolean
val
SimpleNodePrinter
:
TextTreeRenderer
package
net.sourceforge.pmd.test
Module Contents
abstract
class
BaseTextComparisonTest
Module Contents
BaseTextComparisonTest
(
)
const
val
ExpectedExt
:
String
protected
abstract
val
extensionIncludingDot
:
String
fun
String
.
normalize
(
)
:
String
protected
abstract
val
resourceLoader
:
Class
<
*
>
protected
abstract
val
resourcePrefix
:
String
protected
fun
sourceText
(
fileBaseName
:
String
)
:
String