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

unit test for GetMetadataDebSource function More...

#include "pkgagent.h"
#include <stdio.h>
#include "CUnit/CUnit.h"
Include dependency graph for testGetMetadataDebSource.c:

Go to the source code of this file.

Functions

void test_GetMetadataDebSource ()
 Test pkgagent.c Function GetMetadataDebSource() get debian source package info from .dsc file. More...
 
void test_GetMetadataDebSource_wrong_testfile ()
 Test pkgagent.c Function GetMetadataDebSource() test get debian source info from wrong dsc file. More...
 

Variables

char * DBConfFile
 DB conf file location.
 
CU_TestInfo testcases_GetMetadataDebSource []
 testcases for function GetMetadataDebSource More...
 

Detailed Description

unit test for GetMetadataDebSource function

Definition in file testGetMetadataDebSource.c.

Function Documentation

◆ test_GetMetadataDebSource()

void test_GetMetadataDebSource ( )

Test pkgagent.c Function GetMetadataDebSource() get debian source package info from .dsc file.

Test:
  1. Pass Debian source ".dsc" to GetMetadataDebSource()
  2. Check if meta data parsed properly

Definition at line 24 of file testGetMetadataDebSource.c.

◆ test_GetMetadataDebSource_wrong_testfile()

void test_GetMetadataDebSource_wrong_testfile ( )

Test pkgagent.c Function GetMetadataDebSource() test get debian source info from wrong dsc file.

Test:
  1. Pass wrong file to GetMetadataDebSource()
  2. Check if function return -1
Todo:
Needs fix

Definition at line 65 of file testGetMetadataDebSource.c.

Variable Documentation

◆ testcases_GetMetadataDebSource

CU_TestInfo testcases_GetMetadataDebSource[]
Initial value:
= {
{"Testing the function GetMetadataDebSource", test_GetMetadataDebSource},
{"Testing the function GetMetadataDebSource with wrong testfile", test_GetMetadataDebSource_wrong_testfile},
CU_TEST_INFO_NULL
}
void test_GetMetadataDebSource_wrong_testfile()
Test pkgagent.c Function GetMetadataDebSource() test get debian source info from wrong dsc file.
void test_GetMetadataDebSource()
Test pkgagent.c Function GetMetadataDebSource() get debian source package info from ....

testcases for function GetMetadataDebSource

Definition at line 91 of file testGetMetadataDebSource.c.