FOSSology  4.4.0
Open Source License Compliance by Open Source Software
regexTest Class Reference

Test fixture to test regex accuracy. More...

Inheritance diagram for regexTest:
Inheritance graph
Collaboration diagram for regexTest:
Collaboration graph

Protected Member Functions

void regTest (void)
 Test regex on a test string. More...
 
void regTest (void)
 Test regex on a test string. More...
 
void badNameTest (void)
 Test regex on a string with bad identifier. More...
 
void regTestSpecialEnd (void)
 Test regex on a special test string. More...
 

Private Member Functions

 CPPUNIT_TEST_SUITE (regexTest)
 
 CPPUNIT_TEST (regTest)
 
 CPPUNIT_TEST_SUITE_END ()
 
 CPPUNIT_TEST_SUITE (regexTest)
 
 CPPUNIT_TEST (regTest)
 
 CPPUNIT_TEST (badNameTest)
 
 CPPUNIT_TEST (regTestSpecialEnd)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Test fixture to test regex accuracy.

Definition at line 22 of file test_regex.cc.

Member Function Documentation

◆ badNameTest()

void regexTest::badNameTest ( void  )
inlineprotected

Test regex on a string with bad identifier.

Test:
  1. Create a test SPDX identifier string with bad license identifier
  2. Load the regex patterns
  3. Run the regex on the string
  4. Check the actual number of matches against expected result
  5. Check the actual findings matches the expected licenses

Definition at line 105 of file test_regex.cc.

◆ regTest() [1/2]

void regexTest::regTest ( void  )
inlineprotected

Test regex on a test string.

Test:
  1. Create a test string
  2. Create a regex pattern
  3. Run the regex on the string
  4. Check the actual number of matches against expected result

Definition at line 38 of file test_regex.cc.

◆ regTest() [2/2]

void regexTest::regTest ( void  )
inlineprotected

Test regex on a test string.

Test:
  1. Create a test SPDX identifier string
  2. Load the regex patterns
  3. Run the regex on the string
  4. Check the actual number of matches against expected result
  5. Check the actual findings matches the expected licenses

Definition at line 41 of file test_regex.cc.

◆ regTestSpecialEnd()

void regexTest::regTestSpecialEnd ( void  )
inlineprotected

Test regex on a special test string.

Test:
  1. Create a test SPDX identifier string with special characters at end
  2. Load the regex patterns
  3. Run the regex on the string
  4. Check the actual number of matches against expected result
  5. Check the actual findings matches the expected licenses

Definition at line 170 of file test_regex.cc.


The documentation for this class was generated from the following file: