1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#![allow(non_camel_case_types, non_snake_case, dead_code)]

extern crate libc;

pub mod h5;
pub mod h5a;
pub mod h5ac;
pub mod h5c;
pub mod h5d;
pub mod h5e;
pub mod h5f;
pub mod h5fd;
pub mod h5g;
pub mod h5i;
pub mod h5l;
pub mod h5mm;
pub mod h5o;
pub mod h5p;
pub mod h5r;
pub mod h5s;
pub mod h5t;
pub mod h5z;

#[cfg(test)]
mod tests {
    use super::h5::H5open;
    #[cfg(target_os = "linux")] use super::h5p::H5P_CLS_ROOT_g as H5P_ROOT;
    #[cfg(target_os = "macos")] use super::h5p::H5P_CLS_ROOT_ID_g as H5P_ROOT;

    #[test]
    pub fn test_smoke() {
        unsafe {
            H5open();
            assert!(H5P_ROOT > 0);
        }
    }
}