Add test for char to char32_t mapping

This commit is contained in:
Adrian Wong
2019-12-02 10:53:49 +11:00
committed by Emilio Cobos Álvarez
parent 9b1fd8ecca
commit 8a7fbbe1ff
8 changed files with 111 additions and 0 deletions
+11
View File
@@ -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);
+19
View File
@@ -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
+11
View File
@@ -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);
+19
View File
@@ -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
+14
View File
@@ -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"
+11
View File
@@ -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);
+19
View File
@@ -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
+7
View File
@@ -0,0 +1,7 @@
#[repr(C)]
struct Foo {
a: char,
}
#[no_mangle]
pub extern "C" fn root(a: Foo) {}