cbindgen/tests/rust/enum.toml

40 lines
612 B
TOML
Raw Normal View History

header = """
#if 0
''' '
#endif
#ifdef __cplusplus
template <typename T>
using Box = T*;
#endif
#if 0
' '''
#endif
"""
trailer = """
2020-11-18 16:50:59 +03:00
#if 0
''' '
#endif
#include <stddef.h>
#include "testing-helpers.h"
static_assert(offsetof(CBINDGEN_STRUCT(P), tag) == 0, "unexpected offset for tag");
static_assert(offsetof(CBINDGEN_STRUCT(P), p0) == 1, "unexpected offset for p0");
static_assert(offsetof(CBINDGEN_STRUCT(P), p0) == 1, "unexpected offset for p1");
static_assert(sizeof(CBINDGEN_STRUCT(P)) == 4, "unexpected size for P");
2020-11-18 16:50:59 +03:00
#if 0
' '''
#endif
"""
[export]
exclude = [
"Box",
]
[export.rename]
"I" = "ExI"