~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-1.0/t/common.h

  • Committer: Mark Atwood
  • Date: 2011-12-14 18:12:05 UTC
  • mfrom: (2465.1.4 drizzle)
  • Revision ID: me@mark.atwood.name-20111214181205-tkz0lq9c4c0ptrwo
mergeĀ lp:~brianaker/drizzle/fix-localhost

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-1.0/drizzle_client.h>
 
21
#include <libdrizzle-1.0/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);