Class CpdTextComparisonTest
-
- 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 CpdCapableLanguagelanguage
-
Constructor Summary
Constructors Constructor Description CpdTextComparisonTest(String langId, String extensionIncludingDot)CpdTextComparisonTest(CpdCapableLanguage language, String extensionIncludingDot)
-
Method Summary
Modifier and Type Method Description final CpdCapableLanguagegetLanguage()final CpdLexernewCpdLexer(LanguagePropertyConfig config)LanguagePropertyConfigdefaultProperties()final UnitdoTest(String fileBaseName, String expectedSuffix, LanguagePropertyConfig config)A test comparing the output of the tokenizer. final UnitdoTest(String fileBaseName, String expectedSuffix)A test comparing the output of the tokenizer. final UnitdoTest(String fileBaseName)A test comparing the output of the tokenizer. final LexExceptionexpectLexException(String source, FileId fileName, LanguagePropertyConfig properties)final LexExceptionexpectLexException(String source, FileId fileName)final LexExceptionexpectLexException(String source)final LexExceptionexpectLexException(BaseTextComparisonTest.FileData fileData, LanguagePropertyConfig config)final LexExceptionexpectLexException(BaseTextComparisonTest.FileData fileData)final BaseTextComparisonTest.FileDatasourceCodeOf(String text, FileId fileName)final BaseTextComparisonTest.FileDatasourceCodeOf(String text)final Tokenstokenize(CpdLexer cpdLexer, BaseTextComparisonTest.FileData fileData)-
-
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)
-
-
-
-