~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2011-12-12 14:29:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2470.
  • Revision ID: brian@tangent.org-20111212142951-akgfh1vn3g9cos2g
Include additional libdrizzle tests.

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);