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
38
39
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![doc(html_logo_url = "https://gitlab.onelab.info/gmsh/gmsh/raw/master/utils/icons/gmsh.svg")]
include!("bindings.rs");
#[cfg(test)]
mod tests {
use std::os::raw::{c_int};
use std::ffi::CString;
#[test]
pub fn sanity() {
let exec_name = CString::new("gmsh").unwrap();
let mut ierr: c_int = 0;
unsafe {
crate::gmshInitialize(1 as c_int,
[exec_name.into_raw()].as_mut_ptr(), 0 as c_int, &mut ierr);
}
let mut ierr: c_int = 0;
unsafe {
crate::gmshFinalize(&mut ierr);
}
}
}