Lines Matching defs:*
0 #ifndef TEST_H_INCLUDED
2 #define TEST_H_INCLUDED
4 #include <stdio.h>
5 #include <alsa/asoundlib.h>
7 /* XXX this variable definition does not belong in a header file */
8 static int any_test_failed;
10 #define TEST_CHECK(cond) do \
11 if (!(cond)) { \
12 fprintf(stderr, "%s:%d: test failed: %s\n", __FILE__, __LINE__, #cond); \
13 any_test_failed = 1; \
15 while (0)
17 #define ALSA_CHECK(fn) ({ \
18 int err = fn; \
19 if (err < 0) { \
20 fprintf(stderr, "%s:%d: ALSA function call failed (%s): %s\n", \
21 __FILE__, __LINE__, snd_strerror(err), #fn); \
22 any_test_failed = 1; \
24 err; \
27 #define TEST_EXIT_CODE() any_test_failed
29 #endif