Definition at line 58 of file test_scanners.cc.
◆ cleanEntries()
| void scannerTestSuite::cleanEntries |
( |
| ) |
|
|
inlineprotected |
Test cleanMatch() to remove non-UTF8 text and extra spaces.
- Test:
- Load test data and expected data
- Generate matches to clean each line in the file
- Call cleanMatch() to clean each line
- Check if cleaned test data matches expected data
Definition at line 510 of file test_scanners.cc.
◆ copyscannerBareKeywordDiscardTest()
| void scannerTestSuite::copyscannerBareKeywordDiscardTest |
( |
| ) |
|
|
inlineprotected |
◆ copyscannerBinaryNoiseTest()
| void scannerTestSuite::copyscannerBinaryNoiseTest |
( |
| ) |
|
|
inlineprotected |
Regression: binary-file content with a short ASCII prefix before non-ASCII bytes must not be reported as active copyright statements.
- Test:
Definition at line 230 of file test_scanners.cc.
◆ copyscannerCopyrightedStatementTest()
| void scannerTestSuite::copyscannerCopyrightedStatementTest |
( |
| ) |
|
|
inlineprotected |
Regression: "copyrighted" statements and names like "Tom" must not be falsely deactivated by REG_EXCEPTION_COPY.
- Test:
Definition at line 197 of file test_scanners.cc.
◆ copyscannerDotPrefixedNameTest()
| void scannerTestSuite::copyscannerDotPrefixedNameTest |
( |
| ) |
|
|
inlineprotected |
Test copyright scanner with dot-prefixed names like .NET Foundation.
- Test:
Definition at line 131 of file test_scanners.cc.
◆ copyscannerProseExceptionTest()
| void scannerTestSuite::copyscannerProseExceptionTest |
( |
| ) |
|
|
inlineprotected |
Regression: license-prose strings that contain "copyright" as a common noun must be deactivated, not stored as active findings.
- Test:
- Covers five false-positive categories found in the atarashi test corpus:
- "copyrights appearing in" (verb-follow — appear\w* fix)
- "COPYRIGHT TO DETECT" (new keyword: to)
- "copyright work" (new keyword: work)
- "copyright protection" (new keyword: protection)
- "copyrighted interfaces" (new keyword: interfaces?)
- "copyright in/of/on X" (new keywords: in, of, on) Legitimate copyright statements with year or symbol must still be KEPT.
Definition at line 377 of file test_scanners.cc.
◆ copyscannerSpdxArrayTest()
| void scannerTestSuite::copyscannerSpdxArrayTest |
( |
| ) |
|
|
inlineprotected |
Regression: SPDX-FileCopyrightText = [...] TOML array format must yield one active match per quoted element, not a single merged string.
- Test:
Definition at line 267 of file test_scanners.cc.
◆ copyscannerSpdxFullLineTest()
| void scannerTestSuite::copyscannerSpdxFullLineTest |
( |
| ) |
|
|
inlineprotected |
Regression: SPDX-FileCopyrightText entries must be detected as individual single-line statements and their match range must cover the full line in the original content.
- Test:
Definition at line 323 of file test_scanners.cc.
◆ copyscannerTest()
| void scannerTestSuite::copyscannerTest |
( |
| ) |
|
|
inlineprotected |
◆ multiSpdxContentTest()
| void scannerTestSuite::multiSpdxContentTest |
( |
| ) |
|
|
inlineprotected |
◆ nonSpdxContentTest()
| void scannerTestSuite::nonSpdxContentTest |
( |
| ) |
|
|
inlineprotected |
◆ regAuthorTest()
| void scannerTestSuite::regAuthorTest |
( |
| ) |
|
|
inlineprotected |
◆ regEccTest()
| void scannerTestSuite::regEccTest |
( |
| ) |
|
|
inlineprotected |
◆ regEmailTest()
| void scannerTestSuite::regEmailTest |
( |
| ) |
|
|
inlineprotected |
◆ regIpraTest()
| void scannerTestSuite::regIpraTest |
( |
| ) |
|
|
inlineprotected |
◆ regKeywordTest()
| void scannerTestSuite::regKeywordTest |
( |
| ) |
|
|
inlineprotected |
◆ regUrlTest()
| void scannerTestSuite::regUrlTest |
( |
| ) |
|
|
inlineprotected |
◆ scannerTest() [1/2]
| void scannerTestSuite::scannerTest |
( |
const scanner & |
sc, |
|
|
const char * |
content, |
|
|
const string & |
type, |
|
|
list< const char * > |
expectedStrings |
|
) |
| |
|
inlineprivate |
Runs scanner on content and check matches against expectedStrings.
- Parameters
-
| sc | Scanner to use |
| content | Content to scan |
| type | Match type |
| expectedStrings | Expected strings from scanner result |
Definition at line 86 of file test_scanners.cc.
◆ scannerTest() [2/2]
| void scannerTestSuite::scannerTest |
( |
const string & |
content, |
|
|
vector< string > |
expectedStrings |
|
) |
| |
|
inlineprivate |
Runs a scan on content and check matches against expectedStrings.
- Parameters
-
| content | Content to scan |
| expectedStrings | Expected strings from scanner result |
Definition at line 104 of file test_scanners.cc.
◆ spdxContentTest()
| void scannerTestSuite::spdxContentTest |
( |
| ) |
|
|
inlineprotected |
The documentation for this class was generated from the following file: