FOSSology  4.4.0
Open Source License Compliance by Open Source Software
test_Traverse.c File Reference

Unit test cases for Traverse() More...

#include "run_tests.h"
Include dependency graph for test_Traverse.c:

Go to the source code of this file.

Functions

int TraverseInit ()
 initialize
 
int TraverseClean ()
 clean env and others
 
void testTraverseNormal4Package ()
 normal test for one package More...
 
void testTraverseNormal4Package2 ()
 normal test for one package another case More...
 
void testTraverseNormal4Dir ()
 normal test for one directory More...
 
void testTraverseNormal4Rpm ()
 normal test for rpm More...
 
void testTraverseNullParams ()
 abnormal test for null parameters More...
 

Variables

static char * Label = "called by main"
 
static char * Basename =""
 
static ParentInfoPI = NULL
 
static int Result = 0
 
CU_TestInfo Traverse_testcases []
 Traverse() test cases. More...
 

Detailed Description

Unit test cases for Traverse()

Definition in file test_Traverse.c.

Function Documentation

◆ testTraverseNormal4Dir()

void testTraverseNormal4Dir ( )

normal test for one directory

Test:
  1. Call Traverse() on a directory containing packages
  2. Check if the files are unpacked properly

Definition at line 85 of file test_Traverse.c.

◆ testTraverseNormal4Package()

void testTraverseNormal4Package ( )

normal test for one package

Test:
  1. Call Traverse() on a single package
  2. Check if the files are unpacked

Definition at line 47 of file test_Traverse.c.

◆ testTraverseNormal4Package2()

void testTraverseNormal4Package2 ( )

normal test for one package another case

Test:
  1. Call Traverse() on a single package
  2. Check if the files are unpacked

Definition at line 66 of file test_Traverse.c.

◆ testTraverseNormal4Rpm()

void testTraverseNormal4Rpm ( )

normal test for rpm

Test:
  1. Call Traverse() on a single RPM package
  2. Check if the files are unpacked

Definition at line 112 of file test_Traverse.c.

◆ testTraverseNullParams()

void testTraverseNullParams ( )

abnormal test for null parameters

Test:
  1. Call Traverse() on empty strings
  2. Check if function returns 0
  3. Check if nothing is done by function

Definition at line 132 of file test_Traverse.c.

Variable Documentation

◆ Traverse_testcases

CU_TestInfo Traverse_testcases[]
Initial value:
=
{
{"Traverse normal package:", testTraverseNormal4Package},
{"Traverse normal package another:", testTraverseNormal4Package2},
{"Traverse normal directory:", testTraverseNormal4Dir},
{"Traverse normal rpm:", testTraverseNormal4Rpm},
{"Traverse null paramters:", testTraverseNullParams},
CU_TEST_INFO_NULL
}
void testTraverseNormal4Package()
normal test for one package
Definition: test_Traverse.c:47
void testTraverseNullParams()
abnormal test for null parameters
void testTraverseNormal4Rpm()
normal test for rpm
void testTraverseNormal4Dir()
normal test for one directory
Definition: test_Traverse.c:85
void testTraverseNormal4Package2()
normal test for one package another case
Definition: test_Traverse.c:66

Traverse() test cases.

Definition at line 149 of file test_Traverse.c.