netatalk: test.h File Reference

netatalk 4.5.1
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 | ) |
| inlinestatic

## ◆ test_abort()

void test_abort | ( | void |  | ) |
| inlinestatic

## ◆ test_begin()

void test_begin | ( | const char * | name | ) |
| inlinestatic

## ◆ test_fail()

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

## ◆ test_fail_int()

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

## ◆ test_ok()

void test_ok | ( | const char * | name | ) |
| inlinestatic

## ◆ test_plan()

void test_plan | ( | int | count | ) |
| inlinestatic

## ◆ test_section()

void test_section | ( | const char * | title,
|  | const char * | underline )
| inlinestatic

## ◆ test_stream()

FILE * test_stream | ( | void |  | ) |
| inlinestatic

## 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