Skip to content

Commit

Permalink
Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Aug 23, 2017
1 parent 8efbe8c commit 560acfe
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/expectations/tests/issue-888-enum-var-decl-jump.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* automatically generated by rust-bindgen */


#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]


#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
pub mod root {
#[allow(unused_imports)]
use self::super::root;
pub mod Halide {
#[allow(unused_imports)]
use self::super::super::root;
#[repr(C)]
#[derive(Debug, Default, Copy)]
pub struct Type {
pub _address: u8,
}
extern "C" {
#[link_name = "_ZN6Halide4Type1bE"]
pub static mut Type_b: root::a;
}
#[test]
fn bindgen_test_layout_Type() {
assert_eq!(::std::mem::size_of::<Type>() , 1usize , concat ! (
"Size of: " , stringify ! ( Type ) ));
assert_eq! (::std::mem::align_of::<Type>() , 1usize , concat ! (
"Alignment of " , stringify ! ( Type ) ));
}
impl Clone for Type {
fn clone(&self) -> Self { *self }
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum a { }
}
11 changes: 11 additions & 0 deletions tests/headers/issue-888-enum-var-decl-jump.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// bindgen-flags: --enable-cxx-namespaces

namespace Halide {
struct Type;
}
typedef enum {} a;
namespace Halide {
struct Type {
static a b;
};
}

0 comments on commit 560acfe

Please sign in to comment.