Apache HTTPD
Classes | Macros | Typedefs | Functions | Variables
common.h File Reference
#include "expat_config.h"
#include "minicheck.h"
#include "chardata.h"

Go to the source code of this file.

Classes

struct  ExtTest
 

Macros

#define XML_COMMON_H
 
#define XML_FMT_INT_MOD   "l"
 
#define XML_FMT_STR   "s"
 
#define xcstrlen(s)   strlen(s)
 
#define xcstrcmp(s, t)   strcmp((s), (t))
 
#define xcstrncmp(s, t, n)   strncmp((s), (t), (n))
 
#define XCS(s)   s
 
#define xml_failure(parser)   _xml_failure((parser), __FILE__, __LINE__)
 
#define expect_failure(text, errorCode, errorMessage)    _expect_failure((text), (errorCode), (errorMessage), __FILE__, __LINE__)
 
#define run_character_check(text, expected)    _run_character_check(text, expected, __FILE__, __LINE__)
 
#define run_attribute_check(text, expected)    _run_attribute_check(text, expected, __FILE__, __LINE__)
 
#define run_ext_character_check(text, test_data, expected)    _run_ext_character_check(text, test_data, expected, __FILE__, __LINE__)
 
#define ALLOC_ALWAYS_SUCCEED   (-1)
 
#define REALLOC_ALWAYS_SUCCEED   (-1)
 

Typedefs

typedef struct ExtTest ExtTest
 

Functions

void tcase_add_test__ifdef_xml_dtd (TCase *tc, tcase_test_function test)
 
void tcase_add_test__if_xml_ge (TCase *tc, tcase_test_function test)
 
void basic_teardown (void)
 
void _xml_failure (XML_Parser parser, const char *file, int line)
 
enum XML_Status _XML_Parse_SINGLE_BYTES (XML_Parser parser, const char *s, int len, int isFinal)
 
void _expect_failure (const char *text, enum XML_Error errorCode, const char *errorMessage, const char *file, int lineno)
 
void _run_character_check (const char *text, const XML_Char *expected, const char *file, int line)
 
void _run_attribute_check (const char *text, const XML_Char *expected, const char *file, int line)
 
void _run_ext_character_check (const char *text, ExtTest *test_data, const XML_Char *expected, const char *file, int line)
 
void * duff_allocator (size_t size)
 
void * duff_reallocator (void *ptr, size_t size)
 

Variables

XML_Parser g_parser
 
XML_Bool g_resumable
 
XML_Bool g_abortable
 
int g_chunkSize
 
const charlong_character_data_text
 
const charlong_cdata_text
 
const charget_buffer_test_text
 
int g_allocation_count
 
int g_reallocation_count
 

Macro Definition Documentation

◆ ALLOC_ALWAYS_SUCCEED

#define ALLOC_ALWAYS_SUCCEED   (-1)

Definition at line 139 of file common.h.

◆ expect_failure

#define expect_failure (   text,
  errorCode,
  errorMessage 
)     _expect_failure((text), (errorCode), (errorMessage), __FILE__, __LINE__)

Definition at line 108 of file common.h.

◆ REALLOC_ALWAYS_SUCCEED

#define REALLOC_ALWAYS_SUCCEED   (-1)

Definition at line 140 of file common.h.

◆ run_attribute_check

#define run_attribute_check (   text,
  expected 
)     _run_attribute_check(text, expected, __FILE__, __LINE__)

Definition at line 123 of file common.h.

◆ run_character_check

#define run_character_check (   text,
  expected 
)     _run_character_check(text, expected, __FILE__, __LINE__)

Definition at line 117 of file common.h.

◆ run_ext_character_check

#define run_ext_character_check (   text,
  test_data,
  expected 
)     _run_ext_character_check(text, test_data, expected, __FILE__, __LINE__)

Definition at line 136 of file common.h.

◆ XCS

#define XCS (   s)    s

Definition at line 77 of file common.h.

◆ xcstrcmp

#define xcstrcmp (   s,
  t 
)    strcmp((s), (t))

Definition at line 75 of file common.h.

◆ xcstrlen

#define xcstrlen (   s)    strlen(s)

Definition at line 74 of file common.h.

◆ xcstrncmp

#define xcstrncmp (   s,
  t,
  n 
)    strncmp((s), (t), (n))

Definition at line 76 of file common.h.

◆ XML_COMMON_H

#define XML_COMMON_H

Definition at line 49 of file common.h.

◆ xml_failure

#define xml_failure (   parser)    _xml_failure((parser), __FILE__, __LINE__)

Definition at line 99 of file common.h.

◆ XML_FMT_INT_MOD

#define XML_FMT_INT_MOD   "l"

Definition at line 58 of file common.h.

◆ XML_FMT_STR

#define XML_FMT_STR   "s"

Definition at line 73 of file common.h.

Typedef Documentation

◆ ExtTest

Function Documentation

◆ _expect_failure()

void _expect_failure ( const char text,
enum XML_Error  errorCode,
const char errorMessage,
const char file,
int  lineno 
)
extern

Definition at line 214 of file common.c.

◆ _run_attribute_check()

void _run_attribute_check ( const char text,
const XML_Char expected,
const char file,
int  line 
)
extern

Definition at line 240 of file common.c.

◆ _run_character_check()

void _run_character_check ( const char text,
const XML_Char expected,
const char file,
int  line 
)
extern

Definition at line 226 of file common.c.

◆ _run_ext_character_check()

void _run_ext_character_check ( const char text,
ExtTest test_data,
const XML_Char expected,
const char file,
int  line 
)
extern

Definition at line 254 of file common.c.

◆ _xml_failure()

void _xml_failure ( XML_Parser  parser,
const char file,
int  line 
)
extern

Definition at line 181 of file common.c.

◆ _XML_Parse_SINGLE_BYTES()

enum XML_Status _XML_Parse_SINGLE_BYTES ( XML_Parser  parser,
const char s,
int  len,
int  isFinal 
)
extern

Definition at line 193 of file common.c.

◆ basic_teardown()

void basic_teardown ( void  )
extern

Definition at line 169 of file common.c.

◆ duff_allocator()

void * duff_allocator ( size_t  size)
extern

Definition at line 280 of file common.c.

◆ duff_reallocator()

void * duff_reallocator ( void *  ptr,
size_t  size 
)
extern

Definition at line 290 of file common.c.

◆ tcase_add_test__if_xml_ge()

void tcase_add_test__if_xml_ge ( TCase tc,
tcase_test_function  test 
)
extern

Definition at line 159 of file common.c.

◆ tcase_add_test__ifdef_xml_dtd()

void tcase_add_test__ifdef_xml_dtd ( TCase tc,
tcase_test_function  test 
)
extern

Definition at line 149 of file common.c.

Variable Documentation

◆ g_abortable

XML_Bool g_abortable
extern

Definition at line 141 of file common.c.

◆ g_allocation_count

int g_allocation_count
extern

Definition at line 275 of file common.c.

◆ g_chunkSize

int g_chunkSize
extern

Definition at line 144 of file common.c.

◆ g_parser

XML_Parser g_parser
extern

Definition at line 62 of file runtests.c.

◆ g_reallocation_count

int g_reallocation_count
extern

Definition at line 276 of file common.c.

◆ g_resumable

XML_Bool g_resumable
extern

Definition at line 138 of file common.c.

◆ get_buffer_test_text

const char* get_buffer_test_text
extern

Definition at line 111 of file common.c.

◆ long_cdata_text

const char* long_cdata_text
extern

Definition at line 82 of file common.c.

◆ long_character_data_text

const char* long_character_data_text
extern

Definition at line 58 of file common.c.