~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/common.h

  • Committer: Monty Taylor
  • Date: 2010-08-12 20:27:32 UTC
  • mto: (1720.1.5 build)
  • mto: This revision was merged to the branch mainline in revision 1722.
  • Revision ID: mordred@inaugust.com-20100812202732-9kzchbkvkyki4n3u
Merged libdrizzle directly into tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Drizzle Client & Protocol Library
 
3
 *
 
4
 * Copyright (C) 2008 Eric Day (eday@oddments.org)
 
5
 * All rights reserved.
 
6
 *
 
7
 * Use and distribution licensed under the BSD license.  See
 
8
 * the COPYING file in this directory for full text.
 
9
 */
 
10
 
 
11
/**
 
12
 * @file
 
13
 * @brief Includes and macros for tests
 
14
 */
 
15
 
 
16
#include <stdio.h>
 
17
#include <stdlib.h>
 
18
#include <string.h>
 
19
 
 
20
#include <libdrizzle/drizzle_client.h>
 
21
#include <libdrizzle/drizzle_server.h>
 
22
 
 
23
#define drizzle_test(...) do \
 
24
{ \
 
25
  printf(__VA_ARGS__); \
 
26
  printf("\n"); \
 
27
} while (0);
 
28
 
 
29
#define drizzle_test_error(...) do \
 
30
{ \
 
31
  printf("*** %s:%d *** ", __FILE__, __LINE__); \
 
32
  printf(__VA_ARGS__); \
 
33
  printf("\n"); \
 
34
  exit(1); \
 
35
} while (0);