netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
test.h File Reference
`#include <errno.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <atalk/cnid.h>`
`#include <atalk/directory.h>`
`#include <atalk/globals.h>`
`#include <atalk/logger.h>`
`#include <atalk/queue.h>`
`#include <atalk/util.h>`
`#include <atalk/volume.h>`
`#include "afp_config.h"`
`#include "dircache.h"`
`#include "directory.h"`
`#include "hash.h"`
`#include "subtests.h"`
`#include "volume.h"`

Go to the source code of this file.

## Macros
#define | TEST(a)
#define | TEST_int(a, b)
#define | TEST_expr(a, b)

## Functions
static FILE * | test_stream (void)
static void | alignok (int len)
static void | test_plan (int count)
static void | test_section (const char *title, const char *underline)
static void | test_begin (const char *name)
static void | test_ok (const char *name)
static void | test_fail (const char *name, const char *file, int line)
static void | test_fail_int (const char *name, int got, int expected, const char *file, int line)
static void | test_abort (void)

## Variables
int | test_output_tap
int | test_case_num
FILE * | test_report_stream

## Macro Definition Documentation

## ◆ TEST

#define TEST | ( |  | a | ) |

Value:
do { \
test_begin(#a); \
a; \
test_ok(#a); \
} while (0)

## ◆ TEST_expr

#define TEST_expr | ( |  | a,
|  |  | b )

Value:
do { \
test_begin(#a); \
a; \
if (b) { \
test_ok(#a); \
} else { \
test_fail(#a, __FILE__, __LINE__); \
test_abort(); \
exit(1); \
} \
} while (0)

## ◆ TEST_int

#define TEST_int | ( |  | a,
|  |  | b )

Value:
do { \
test_begin(#a); \
if ((reti = (a)) != b) { \
test_fail_int(#a, reti, b, __FILE__, \
__LINE__); \
test_abort(); \
exit(1); \
} else { \
test_ok(#a); \
} \
} while (0)

## Function Documentation

## ◆ alignok()

void alignok | ( | int | len | ) |
| inline static

## ◆ test_abort()

void test_abort | ( | void |  | ) |
| inline static

## ◆ test_begin()

void test_begin | ( | const char * | name | ) |
| inline static

## ◆ test_fail()

void test_fail | ( | const char * | name,
|  | const char * | file,
|  | int | line )
| inline static

## ◆ test_fail_int()

void test_fail_int | ( | const char * | name,
|  | int | got,
|  | int | expected,
|  | const char * | file,
|  | int | line )
| inline static

## ◆ test_ok()

void test_ok | ( | const char * | name | ) |
| inline static

## ◆ test_plan()

void test_plan | ( | int | count | ) |
| inline static

## ◆ test_section()

void test_section | ( | const char * | title,
|  | const char * | underline )
| inline static

## ◆ test_stream()

FILE * test_stream | ( | void |  | ) |
| inline static

## Variable Documentation

## ◆ test_case_num

int test_case_num
| extern

## ◆ test_output_tap

int test_output_tap
| extern

## ◆ test_report_stream

FILE* test_report_stream
| extern