Add test for char to char32_t mapping
This commit is contained in:
committed by
Emilio Cobos Álvarez
parent
9b1fd8ecca
commit
8a7fbbe1ff
@@ -0,0 +1,11 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <uchar.h>
|
||||
|
||||
typedef struct Foo {
|
||||
char32_t a;
|
||||
} Foo;
|
||||
|
||||
void root(Foo a);
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <uchar.h>
|
||||
|
||||
typedef struct Foo {
|
||||
char32_t a;
|
||||
} Foo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <uchar.h>
|
||||
|
||||
typedef struct {
|
||||
char32_t a;
|
||||
} Foo;
|
||||
|
||||
void root(Foo a);
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <uchar.h>
|
||||
|
||||
typedef struct {
|
||||
char32_t a;
|
||||
} Foo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
@@ -0,0 +1,14 @@
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
|
||||
struct Foo {
|
||||
char32_t a;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
} // extern "C"
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <uchar.h>
|
||||
|
||||
struct Foo {
|
||||
char32_t a;
|
||||
};
|
||||
|
||||
void root(struct Foo a);
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <uchar.h>
|
||||
|
||||
struct Foo {
|
||||
char32_t a;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void root(struct Foo a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
@@ -0,0 +1,7 @@
|
||||
#[repr(C)]
|
||||
struct Foo {
|
||||
a: char,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn root(a: Foo) {}
|
||||
Reference in New Issue
Block a user