src/test/test.h
author Tero Marttila <terom@fixme.fi>
Mon, 04 May 2009 20:55:04 +0300
branchnew-transport
changeset 168 a58ad50911fc
child 194 808b1b047620
permissions -rw-r--r--
refactor test.c into tests/*
#ifndef TEST_TEST_H
#define TEST_TEST_H

/**
 * @file
 *
 * General test-related functionality
 */
#include "assert.h"
#include "util.h"

#include <event2/event.h>
#include <string.h>

/**
 * Global test-running state
 */
extern struct test_ctx {
    /** The event_base that we have setup */
    struct event_base *ev_base;

} _test_ctx;


/**
 * Global list of test definitions
 */
extern const struct test {
    /** Test name */
    const char *name;

    /** Test func */
    void (*func) (void);
    
    /** Do not run by default */    
    bool optional;
} _tests[];



#endif