FOSSology  4.7.1
Open Source License Compliance by Open Source Software
ReuserWorkerTest Class Reference
Inheritance diagram for ReuserWorkerTest:
Inheritance graph
Collaboration diagram for ReuserWorkerTest:
Collaboration graph

Protected Member Functions

void testStandardReuseDispatch ()
 reuseMode == 0 routes to processUploadReuse (standard path). More...
 
void testEnhancedReuseDispatch ()
 REUSE_ENHANCED bit routes to processEnhancedUploadReuse. More...
 
void testAllFlagsDispatch ()
 All optional flag bits together cause all optional methods to be called. More...
 
void testNoReusedUploadsSucceeds ()
 An empty reuse list results in immediate success without any processing. More...
 
void testMissingParentBoundsSkipsUpload ()
 A reuse link whose parent bounds cannot be determined is skipped. More...
 
void testProcessUploadReuseFailurePropagates ()
 A false return from processUploadReuse propagates to the caller. More...
 

Private Member Functions

 CPPUNIT_TEST_SUITE (ReuserWorkerTest)
 
 CPPUNIT_TEST (testStandardReuseDispatch)
 
 CPPUNIT_TEST (testEnhancedReuseDispatch)
 
 CPPUNIT_TEST (testAllFlagsDispatch)
 
 CPPUNIT_TEST (testNoReusedUploadsSucceeds)
 
 CPPUNIT_TEST (testMissingParentBoundsSkipsUpload)
 
 CPPUNIT_TEST (testProcessUploadReuseFailurePropagates)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 64 of file test_worker.cc.

Member Function Documentation

◆ testAllFlagsDispatch()

void ReuserWorkerTest::testAllFlagsDispatch ( )
inlineprotected

All optional flag bits together cause all optional methods to be called.

When reuseMode has REUSE_ENHANCED | REUSE_MAIN | REUSE_CONF | REUSE_COPYRIGHT set, reuseMainLicense, reuseConfSettings and reuseCopyrights must all be invoked in addition to processEnhancedUploadReuse.

Definition at line 151 of file test_worker.cc.

◆ testEnhancedReuseDispatch()

void ReuserWorkerTest::testEnhancedReuseDispatch ( )
inlineprotected

REUSE_ENHANCED bit routes to processEnhancedUploadReuse.

When the REUSE_ENHANCED bit is set, processEnhancedUploadReuse must be called and processUploadReuse must not be called.

Definition at line 116 of file test_worker.cc.

◆ testMissingParentBoundsSkipsUpload()

void ReuserWorkerTest::testMissingParentBoundsSkipsUpload ( )
inlineprotected

A reuse link whose parent bounds cannot be determined is skipped.

When getParentItemBounds returns false for a given reused upload id, that link must be silently skipped and processing must continue with the next link. The overall result must still be true.

Definition at line 207 of file test_worker.cc.

◆ testNoReusedUploadsSucceeds()

void ReuserWorkerTest::testNoReusedUploadsSucceeds ( )
inlineprotected

An empty reuse list results in immediate success without any processing.

When getReusedUploads returns an empty vector, the function must return true without calling any of the process* methods.

Definition at line 192 of file test_worker.cc.

◆ testProcessUploadReuseFailurePropagates()

void ReuserWorkerTest::testProcessUploadReuseFailurePropagates ( )
inlineprotected

A false return from processUploadReuse propagates to the caller.

When processUploadReuse signals failure, the worker must immediately return false without processing further reuse links.

Definition at line 242 of file test_worker.cc.

◆ testStandardReuseDispatch()

void ReuserWorkerTest::testStandardReuseDispatch ( )
inlineprotected

reuseMode == 0 routes to processUploadReuse (standard path).

When none of the reuse-mode bits are set, processUploadReuse must be called and processEnhancedUploadReuse must not be called.

Definition at line 82 of file test_worker.cc.


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