summaryrefslogtreecommitdiff
path: root/tests/upb_test.h
blob: 0e307c5889189d9a1e169699317dfda6cc50ef9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * upb - a minimalist implementation of protocol buffers.
 *
 * Copyright (c) 2011 Joshua Haberman.  See LICENSE for details.
 */

#ifndef UPB_TEST_H_
#define UPB_TEST_H_

#ifdef __cplusplus
extern "C" {
#endif

int num_assertions = 0;
#define ASSERT(expr) do { \
  ++num_assertions; \
  if (!(expr)) { \
    fprintf(stderr, "Assertion failed: %s:%d\n", __FILE__, __LINE__); \
    abort(); \
  } \
} while(0)

#ifdef __cplusplus
}  /* extern "C" */
#endif

#endif  /* UPB_DECODER_H_ */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback