UniMRCP  1.7.0
Data Structures | Typedefs | Functions
apt_test_suite.h File Reference

Test Suite and Framework Definitions. More...

#include "apt_string.h"
Include dependency graph for apt_test_suite.h:

Go to the source code of this file.

Data Structures

struct  apt_test_suite_t
 

Typedefs

typedef typedefAPT_BEGIN_EXTERN_C struct apt_test_suite_t apt_test_suite_t
 
typedef apt_bool_t(* apt_test_f) (apt_test_suite_t *suite, int argc, const char *const *argv)
 
typedef struct apt_test_framework_t apt_test_framework_t
 

Functions

apt_test_suite_tapt_test_suite_create (apr_pool_t *pool, const char *name, void *obj, apt_test_f tester)
 
apt_test_framework_tapt_test_framework_create (void)
 
void apt_test_framework_destroy (apt_test_framework_t *framework)
 
apt_bool_t apt_test_framework_suite_add (apt_test_framework_t *framework, apt_test_suite_t *suite)
 
apt_bool_t apt_test_framework_run (apt_test_framework_t *framework, int argc, const char *const *argv)
 
apr_pool_t * apt_test_framework_pool_get (const apt_test_framework_t *framework)
 

Detailed Description

Test Suite and Framework Definitions.

Typedef Documentation

◆ apt_test_f

typedef apt_bool_t(* apt_test_f) (apt_test_suite_t *suite, int argc, const char *const *argv)

Prototype of test function

◆ apt_test_framework_t

Opaque test framework declaration

◆ apt_test_suite_t

typedef typedefAPT_BEGIN_EXTERN_C struct apt_test_suite_t apt_test_suite_t

Opaque test suite declaration

Function Documentation

◆ apt_test_framework_create()

apt_test_framework_t* apt_test_framework_create ( void  )

Create test framework.

◆ apt_test_framework_destroy()

void apt_test_framework_destroy ( apt_test_framework_t framework)

Destroy test framework.

Parameters
frameworkthe test framework to destroy

◆ apt_test_framework_pool_get()

apr_pool_t* apt_test_framework_pool_get ( const apt_test_framework_t framework)

Retrieve the memory pool.

Parameters
frameworkthe test framework to retrieve memory pool from

◆ apt_test_framework_run()

apt_bool_t apt_test_framework_run ( apt_test_framework_t framework,
int  argc,
const char *const *  argv 
)

Run test suites.

Parameters
frameworkthe test framework
argcthe number of arguments
argvthe array of arguments

◆ apt_test_framework_suite_add()

apt_bool_t apt_test_framework_suite_add ( apt_test_framework_t framework,
apt_test_suite_t suite 
)

Add test suite to framework.

Parameters
frameworkthe test framework to add test suite to
suitethe test suite to add

◆ apt_test_suite_create()

apt_test_suite_t* apt_test_suite_create ( apr_pool_t *  pool,
const char *  name,
void *  obj,
apt_test_f  tester 
)

Create test suite.

Parameters
poolthe pool to allocate memory from
namethe unique name of the test suite
objthe external object associated with the test suite
testerthe test function to execute