FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
test_nomos_gap.c File Reference

Unit test cases for Nomos_gap. More...

#include <stdlib.h>
#include <stdio.h>
#include <CUnit/CUnit.h>
#include <stdarg.h>
#include "nomos_gap.h"
Include dependency graph for test_nomos_gap.c:

Go to the source code of this file.

Functions

void test_collapseInvisible ()
 Test for collapseInvisible() More...
 
void test_uncollapseInvisible ()
 Test for uncollapsePosition() on collapseInvisible() More...
 
void test_collapseSpaces ()
 Test for collapseSpaces() More...
 
void test_uncollapseSpaces ()
 Test for uncollapsePosition() on collapseSpaces() More...
 

Variables

CU_TestInfo nomos_gap_testcases []
 

Detailed Description

Unit test cases for Nomos_gap.

Definition in file test_nomos_gap.c.

Function Documentation

void test_collapseInvisible ( )

Test for collapseInvisible()

Test:
  1. Create a string with INVISIBLE characters
  2. Call collapseInvisible()
  3. Check if the string is collapsed with getPairPosOff()

Definition at line 37 of file test_nomos_gap.c.

void test_collapseSpaces ( )

Test for collapseSpaces()

Test:
  1. Create a string with spaces
  2. Call collapseSpaces()
  3. Check if the string is collapsed with getPairPosOff()

Definition at line 84 of file test_nomos_gap.c.

void test_uncollapseInvisible ( )

Test for uncollapsePosition() on collapseInvisible()

Test:
  1. Create a string with INVISIBLE characters
  2. Call collapseInvisible()
  3. Check if the string can be uncollapsed by calling uncollapsePosition()

Definition at line 61 of file test_nomos_gap.c.

void test_uncollapseSpaces ( )

Test for uncollapsePosition() on collapseSpaces()

Test:
  1. Create a string with spaces
  2. Call collapseSpaces()
  3. Check if the string can be uncollapsed by calling uncollapsePosition()

Definition at line 107 of file test_nomos_gap.c.

Variable Documentation

CU_TestInfo nomos_gap_testcases[]
Initial value:
= {
{"Testing collapse space:", test_collapseSpaces},
{"Testing uncollapse space:", test_uncollapseSpaces},
{"Testing collapse:", test_collapseInvisible},
{"Testing uncollapse:", test_uncollapseInvisible},
CU_TEST_INFO_NULL
}
void test_collapseSpaces()
Test for collapseSpaces()
void test_uncollapseInvisible()
Test for uncollapsePosition() on collapseInvisible()
void test_uncollapseSpaces()
Test for uncollapsePosition() on collapseSpaces()
void test_collapseInvisible()
Test for collapseInvisible()

Definition at line 122 of file test_nomos_gap.c.