Apache HTTPD
Macros | Functions | Variables
common.c File Reference
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "expat_config.h"
#include "expat.h"
#include "internal.h"
#include "chardata.h"
#include "minicheck.h"
#include "common.h"
#include "handlers.h"

Go to the source code of this file.

Macros

#define ALLOC_ALWAYS_SUCCEED   (-1)
 
#define REALLOC_ALWAYS_SUCCEED   (-1)
 

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

const charlong_character_data_text
 
const charlong_cdata_text
 
const charget_buffer_test_text
 
XML_Bool g_resumable = XML_FALSE
 
XML_Bool g_abortable = XML_FALSE
 
int g_chunkSize = 1
 
int g_allocation_count = (-1)
 
int g_reallocation_count = (-1)
 

Macro Definition Documentation

◆ ALLOC_ALWAYS_SUCCEED

#define ALLOC_ALWAYS_SUCCEED   (-1)

Definition at line 272 of file common.c.

◆ REALLOC_ALWAYS_SUCCEED

#define REALLOC_ALWAYS_SUCCEED   (-1)

Definition at line 273 of file common.c.

Function Documentation

◆ _expect_failure()

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

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 
)

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 
)

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 
)

Definition at line 254 of file common.c.

◆ _xml_failure()

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

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 
)

Definition at line 193 of file common.c.

◆ basic_teardown()

void basic_teardown ( void  )

Definition at line 169 of file common.c.

◆ duff_allocator()

void * duff_allocator ( size_t  size)

Definition at line 280 of file common.c.

◆ duff_reallocator()

void * duff_reallocator ( void *  ptr,
size_t  size 
)

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 
)

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 
)

Definition at line 149 of file common.c.

Variable Documentation

◆ g_abortable

XML_Bool g_abortable = XML_FALSE

Definition at line 141 of file common.c.

◆ g_allocation_count

int g_allocation_count = (-1)

Definition at line 275 of file common.c.

◆ g_chunkSize

int g_chunkSize = 1

Definition at line 144 of file common.c.

◆ g_reallocation_count

int g_reallocation_count = (-1)

Definition at line 276 of file common.c.

◆ g_resumable

XML_Bool g_resumable = XML_FALSE

Definition at line 138 of file common.c.

◆ get_buffer_test_text

const char* get_buffer_test_text
Initial value:
= "<documentwitharidiculouslylongelementnametotease"
"aparticularcorneroftheallocationinXML_GetBuffers"
"othatwecanimprovethecoverageyetagain012345678901"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789abcdef0"
"123456789abcdef0123456789abcdef0123456789>\n<ef0"

Definition at line 111 of file common.c.

◆ long_cdata_text

const char* long_cdata_text
Initial value:
= "<s><![CDATA["
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"]]></s>"

Definition at line 82 of file common.c.

◆ long_character_data_text

const char* long_character_data_text
Initial value:
= "<?xml version='1.0' encoding='iso-8859-1'?><s>"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"012345678901234567890123456789012345678901234567890123456789"
"</s>"

Definition at line 58 of file common.c.