Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
489 B
28 lines
489 B
14 years ago
|
/*
|
||
|
* 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_ */
|