File: testing-helpers.h

package info (click to toggle)
rust-cbindgen 0.27.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,616 kB
  • sloc: ansic: 15; makefile: 11
file content (20 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef testing_helpers_h
#define testing_helpers_h

// This is a helper file to easily add static_asserts to C / C++ tests.

#ifndef __cplusplus
#include <assert.h>
#endif

#if defined(CBINDGEN_STYLE_TAG) && !defined(__cplusplus)
#define CBINDGEN_STRUCT(name) struct name
#define CBINDGEN_UNION(name) union name
#define CBINDGEN_ENUM(name) enum name
#else
#define CBINDGEN_STRUCT(name) name
#define CBINDGEN_UNION(name) name
#define CBINDGEN_ENUM(name) name
#endif

#endif