FOSSology  4.4.0
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

◆ test_collapseInvisible()

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 25 of file test_nomos_gap.c.

◆ test_collapseSpaces()

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 72 of file test_nomos_gap.c.

◆ test_uncollapseInvisible()

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 49 of file test_nomos_gap.c.

◆ test_uncollapseSpaces()

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 95 of file test_nomos_gap.c.

Variable Documentation

◆ nomos_gap_testcases

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_collapseInvisible()
Test for collapseInvisible()
void test_uncollapseInvisible()
Test for uncollapsePosition() on collapseInvisible()
void test_collapseSpaces()
Test for collapseSpaces()
void test_uncollapseSpaces()
Test for uncollapsePosition() on collapseSpaces()

Definition at line 110 of file test_nomos_gap.c.