Skip to content

Commit 21a0070

Browse files
authored
Merge pull request #1223 from google/test-for-1214
Fix enum u16 representation.
2 parents a3ab76c + a6ffcc1 commit 21a0070

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ log = "0.4"
3030
proc-macro2 = "1.0.11"
3131
quote = "1.0"
3232
indoc = "1.0"
33-
autocxx-bindgen = "=0.62.0"
33+
autocxx-bindgen = "=0.62.1"
3434
#autocxx-bindgen = { git = "https://github.com/adetaylor/rust-bindgen", branch = "merge-upstream-0.62" }
3535
itertools = "0.10.3"
3636
cc = { version = "1.0", optional = true }

integration-tests/tests/integration_test.rs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7335,14 +7335,24 @@ fn test_issue_956() {
73357335
let hdr = indoc! {"
73367336
#include <cstdint>
73377337
inline void take_int(int&) {}
7338-
inline void take_uin16(uint16_t&) {}
7339-
inline void take_char16(char16_t &) {}
7338+
inline void take_uint16(uint16_t) {}
7339+
inline void take_us(unsigned short) {}
7340+
inline void take_char16(char16_t) {}
7341+
inline void take_uint16_ref(uint16_t&) {}
7342+
inline void take_char16_ref(char16_t &) {}
73407343
"};
73417344
run_test(
73427345
"",
73437346
hdr,
73447347
quote! {},
7345-
&["take_int", "take_uin16", "take_char16"],
7348+
&[
7349+
"take_int",
7350+
"take_uint16",
7351+
"take_char16",
7352+
"take_uint16_ref",
7353+
"take_char16_ref",
7354+
"take_us",
7355+
],
73467356
&[],
73477357
);
73487358
}
@@ -11805,6 +11815,18 @@ fn test_issue_1192() {
1180511815
);
1180611816
}
1180711817

11818+
#[test]
11819+
fn test_issue_1214() {
11820+
let hdr = indoc! {"
11821+
#include <cstdint>
11822+
enum class C: uint16_t {
11823+
A,
11824+
B,
11825+
};
11826+
"};
11827+
run_test("", hdr, quote! {}, &["C"], &[]);
11828+
}
11829+
1180811830
// Yet to test:
1180911831
// - Ifdef
1181011832
// - Out param pointers

0 commit comments

Comments
 (0)