Skip to content

Commit 704a6f9

Browse files
author
bors-servo
authored
Auto merge of #31 - emilio:testing, r=nox
test: Add test for keywords from upstream. This is the only test that's missing from upstream apart from the `va_list` one, that produces similar output but doesn't compile in any of the versions.
2 parents 6da5754 + aab35ea commit 704a6f9

File tree

2 files changed

+143
-0
lines changed

2 files changed

+143
-0
lines changed

tests/expectations/keywords.rs

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(non_snake_case)]
5+
6+
7+
extern "C" {
8+
pub static mut u8: ::std::os::raw::c_int;
9+
pub static mut u16: ::std::os::raw::c_int;
10+
pub static mut u32: ::std::os::raw::c_int;
11+
pub static mut u64: ::std::os::raw::c_int;
12+
pub static mut i8: ::std::os::raw::c_int;
13+
pub static mut i16: ::std::os::raw::c_int;
14+
pub static mut i32: ::std::os::raw::c_int;
15+
pub static mut i64: ::std::os::raw::c_int;
16+
pub static mut f32: ::std::os::raw::c_int;
17+
pub static mut f64: ::std::os::raw::c_int;
18+
pub static mut usize: ::std::os::raw::c_int;
19+
pub static mut isize: ::std::os::raw::c_int;
20+
#[link_name = "as"]
21+
pub static mut as_: ::std::os::raw::c_int;
22+
#[link_name = "box"]
23+
pub static mut box_: ::std::os::raw::c_int;
24+
#[link_name = "crate"]
25+
pub static mut crate_: ::std::os::raw::c_int;
26+
#[link_name = "false"]
27+
pub static mut false_: ::std::os::raw::c_int;
28+
#[link_name = "fn"]
29+
pub static mut fn_: ::std::os::raw::c_int;
30+
#[link_name = "impl"]
31+
pub static mut impl_: ::std::os::raw::c_int;
32+
#[link_name = "in"]
33+
pub static mut in_: ::std::os::raw::c_int;
34+
#[link_name = "let"]
35+
pub static mut let_: ::std::os::raw::c_int;
36+
#[link_name = "loop"]
37+
pub static mut loop_: ::std::os::raw::c_int;
38+
#[link_name = "match"]
39+
pub static mut match_: ::std::os::raw::c_int;
40+
#[link_name = "mod"]
41+
pub static mut mod_: ::std::os::raw::c_int;
42+
#[link_name = "move"]
43+
pub static mut move_: ::std::os::raw::c_int;
44+
#[link_name = "mut"]
45+
pub static mut mut_: ::std::os::raw::c_int;
46+
#[link_name = "pub"]
47+
pub static mut pub_: ::std::os::raw::c_int;
48+
#[link_name = "ref"]
49+
pub static mut ref_: ::std::os::raw::c_int;
50+
#[link_name = "self"]
51+
pub static mut self_: ::std::os::raw::c_int;
52+
#[link_name = "Self"]
53+
pub static mut Self_: ::std::os::raw::c_int;
54+
#[link_name = "super"]
55+
pub static mut super_: ::std::os::raw::c_int;
56+
#[link_name = "trait"]
57+
pub static mut trait_: ::std::os::raw::c_int;
58+
#[link_name = "true"]
59+
pub static mut true_: ::std::os::raw::c_int;
60+
#[link_name = "type"]
61+
pub static mut type_: ::std::os::raw::c_int;
62+
#[link_name = "unsafe"]
63+
pub static mut unsafe_: ::std::os::raw::c_int;
64+
#[link_name = "use"]
65+
pub static mut use_: ::std::os::raw::c_int;
66+
#[link_name = "where"]
67+
pub static mut where_: ::std::os::raw::c_int;
68+
#[link_name = "abstract"]
69+
pub static mut abstract_: ::std::os::raw::c_int;
70+
#[link_name = "alignof"]
71+
pub static mut alignof_: ::std::os::raw::c_int;
72+
#[link_name = "become"]
73+
pub static mut become_: ::std::os::raw::c_int;
74+
#[link_name = "final"]
75+
pub static mut final_: ::std::os::raw::c_int;
76+
#[link_name = "macro"]
77+
pub static mut macro_: ::std::os::raw::c_int;
78+
#[link_name = "offsetof"]
79+
pub static mut offsetof_: ::std::os::raw::c_int;
80+
#[link_name = "override"]
81+
pub static mut override_: ::std::os::raw::c_int;
82+
#[link_name = "priv"]
83+
pub static mut priv_: ::std::os::raw::c_int;
84+
#[link_name = "proc"]
85+
pub static mut proc_: ::std::os::raw::c_int;
86+
#[link_name = "pure"]
87+
pub static mut pure_: ::std::os::raw::c_int;
88+
#[link_name = "unsized"]
89+
pub static mut unsized_: ::std::os::raw::c_int;
90+
#[link_name = "virtual"]
91+
pub static mut virtual_: ::std::os::raw::c_int;
92+
#[link_name = "yield"]
93+
pub static mut yield_: ::std::os::raw::c_int;
94+
}

tests/headers/keywords.h

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
int u8;
2+
int u16;
3+
int u32;
4+
int u64;
5+
int i8;
6+
int i16;
7+
int i32;
8+
int i64;
9+
int f32;
10+
int f64;
11+
int usize;
12+
int isize;
13+
int as;
14+
int box;
15+
int crate;
16+
int false;
17+
int fn;
18+
int impl;
19+
int in;
20+
int let;
21+
int loop;
22+
int match;
23+
int mod;
24+
int move;
25+
int mut;
26+
int pub;
27+
int ref;
28+
int self;
29+
int Self;
30+
int super;
31+
int trait;
32+
int true;
33+
int type;
34+
int unsafe;
35+
int use;
36+
int where;
37+
int abstract;
38+
int alignof;
39+
int become;
40+
int final;
41+
int macro;
42+
int offsetof;
43+
int override;
44+
int priv;
45+
int proc;
46+
int pure;
47+
int unsized;
48+
int virtual;
49+
int yield;

0 commit comments

Comments
 (0)