summaryrefslogtreecommitdiff
path: root/tests/tests.rs
diff options
context:
space:
mode:
authorDarren Kulp <darren@kulp.ch>2020-06-22 18:07:08 -0700
committerEmilio Cobos Álvarez <emilio@crisal.io>2020-06-29 03:39:19 +0200
commitd4f786ff4129cc8f0d218361bdd0fb2608c5823c (patch)
treec26f44d7e9abc271e50cf16bcf04b37b336a3e72 /tests/tests.rs
parent3dafdca17bd1c319f1ca45baee439cac97b0321f (diff)
Emit bindgen version in generated header
Update expectations
Diffstat (limited to 'tests/tests.rs')
-rw-r--r--tests/tests.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 9bf11da9..2f8cdea9 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -352,6 +352,7 @@ fn test_clang_env_args() {
"-D_ENV_ONE=1 -D_ENV_TWO=\"2 -DNOT_THREE=1\"",
);
let actual = builder()
+ .disable_header_comment()
.header_contents(
"test.hpp",
"#ifdef _ENV_ONE\nextern const int x[] = { 42 };\n#endif\n\
@@ -366,9 +367,7 @@ fn test_clang_env_args() {
println!("{}", stderr);
let (expected, _) = rustfmt(
- "/* automatically generated by rust-bindgen */
-
-extern \"C\" {
+ "extern \"C\" {
pub static x: [::std::os::raw::c_int; 1usize];
}
extern \"C\" {
@@ -384,6 +383,7 @@ extern \"C\" {
#[test]
fn test_header_contents() {
let actual = builder()
+ .disable_header_comment()
.header_contents("test.h", "int foo(const char* a);")
.clang_arg("--target=x86_64-unknown-linux")
.generate()
@@ -394,9 +394,7 @@ fn test_header_contents() {
println!("{}", stderr);
let (expected, _) = rustfmt(
- "/* automatically generated by rust-bindgen */
-
-extern \"C\" {
+ "extern \"C\" {
pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
"