-
- All Implemented Interfaces:
public abstract class CpdTextComparisonTest extends BaseTextComparisonTest
CPD test comparing a dump of a file against a saved baseline. Each token is printed on a separate line.
-
-
Field Summary
Fields Modifier and Type Field Description private final CpdCapableLanguage
language
-
Constructor Summary
Constructors Constructor Description CpdTextComparisonTest(String langId, String extensionIncludingDot)
CpdTextComparisonTest(CpdCapableLanguage language, String extensionIncludingDot)
-
Method Summary
-
-
Constructor Detail
-
CpdTextComparisonTest
CpdTextComparisonTest(CpdCapableLanguage language, String extensionIncludingDot)
- Parameters:
extensionIncludingDot
- File extension for the language.
-
-
Method Detail
-
getLanguage
final CpdCapableLanguage getLanguage()
-
newCpdLexer
final CpdLexer newCpdLexer(LanguagePropertyConfig config)
-
defaultProperties
LanguagePropertyConfig defaultProperties()
-
doTest
@JvmOverloads() final Unit doTest(String fileBaseName, String expectedSuffix, LanguagePropertyConfig config)
A test comparing the output of the tokenizer.
- Parameters:
fileBaseName
- Name of the source file (without extension or resource prefix)expectedSuffix
- Suffix to append to the expected file.config
- Properties to configure the tokenizer
-
doTest
@JvmOverloads() final Unit doTest(String fileBaseName, String expectedSuffix)
A test comparing the output of the tokenizer.
- Parameters:
fileBaseName
- Name of the source file (without extension or resource prefix)expectedSuffix
- Suffix to append to the expected file.
-
doTest
@JvmOverloads() final Unit doTest(String fileBaseName)
A test comparing the output of the tokenizer.
- Parameters:
fileBaseName
- Name of the source file (without extension or resource prefix)
-
expectLexException
@JvmOverloads() final LexException expectLexException(String source, FileId fileName, LanguagePropertyConfig properties)
-
expectLexException
@JvmOverloads() final LexException expectLexException(String source, FileId fileName)
-
expectLexException
@JvmOverloads() final LexException expectLexException(String source)
-
expectLexException
@JvmOverloads() final LexException expectLexException(BaseTextComparisonTest.FileData fileData, LanguagePropertyConfig config)
-
expectLexException
@JvmOverloads() final LexException expectLexException(BaseTextComparisonTest.FileData fileData)
-
sourceCodeOf
@JvmOverloads() final BaseTextComparisonTest.FileData sourceCodeOf(String text, FileId fileName)
-
sourceCodeOf
@JvmOverloads() final BaseTextComparisonTest.FileData sourceCodeOf(String text)
-
tokenize
final Tokens tokenize(CpdLexer cpdLexer, BaseTextComparisonTest.FileData fileData)
-
-
-
-