Include config.h only if it exists.
[pspp] / tests / test-verify.c
1 #ifdef HAVE_CONFIG_H
2 # include <config.h>
3 #endif
4
5 #include "verify.h"
6
7 int x;
8 enum { a, b, c };
9
10 verify (x >= 0);                  /* should give ERROR: non-constant expression */
11 verify (c == 2);                  /* should be ok */
12 verify (1 + 1 == 3);              /* should give ERROR */
13 verify (1 == 1); verify (1 == 1); /* should be ok */
14
15 int function (int n)
16 {
17   verify (n >= 0);                  /* should give ERROR: non-constant expression */
18   verify (c == 2);                  /* should be ok */
19   verify (1 + 1 == 3);              /* should give ERROR */
20   verify (1 == 1); verify (1 == 1); /* should be ok */
21
22   if (n)
23     return (verify_expr (1 == 1), verify_expr (1 == 1), 7); /* should be ok */
24   else
25     return (verify_expr (1 == 2), 5); /* should give ERROR */
26 }