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

unit test case for checksum.c More...

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

Go to the source code of this file.

Functions

void testCountDigits ()
 test function CountDigits More...
 
void testSumComputeFile ()
 test function SumComputeFile More...
 
void testSumToString ()
 test function SumToString More...
 

Variables

CU_TestInfo Checksum_testcases []
 Checksum test cases. More...
 

Detailed Description

unit test case for checksum.c

Definition in file test_Checksum.c.

Function Documentation

◆ testCountDigits()

void testCountDigits ( )

test function CountDigits

Test:
  1. Call CountDigits() with a number
  2. Check if function returned actual count

Definition at line 19 of file test_Checksum.c.

◆ testSumComputeFile()

void testSumComputeFile ( )

test function SumComputeFile

Test:
  1. Compute checksum of a known file using SumComputeFile()
  2. Compare if the function result correct checksum

Definition at line 34 of file test_Checksum.c.

◆ testSumToString()

void testSumToString ( )

test function SumToString

Test:
  1. Get a result from SumComputeFile()
  2. Call SumToString() on the result
  3. Check if the function translated the structure to a string

Definition at line 70 of file test_Checksum.c.

Variable Documentation

◆ Checksum_testcases

CU_TestInfo Checksum_testcases[]
Initial value:
=
{
{"Checksum function CountDigits:", testCountDigits},
{"Checksum function SumComputeFile:", testSumComputeFile},
{"Checksum function SumToString:", testSumToString},
CU_TEST_INFO_NULL
}
void testSumToString()
test function SumToString
Definition: test_Checksum.c:70
void testCountDigits()
test function CountDigits
Definition: test_Checksum.c:19
void testSumComputeFile()
test function SumComputeFile
Definition: test_Checksum.c:34

Checksum test cases.

Definition at line 94 of file test_Checksum.c.