1pub mod bindings;
2pub mod types;
3
4pub use bindings::*;
5pub use types::*;
6
7#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
8#[cfg(test)]
9mod tests {
10 use crate::{
11 jl_atexit_hook, jl_eval_string, jl_exception_occurred, jl_init, jl_is_initialized,
12 };
13
14 #[test]
15 fn sanity_test() {
16 unsafe {
17 assert!(jl_is_initialized() == 0);
18 jl_init();
19 assert!(jl_is_initialized() != 0);
20
21 let s = c"sqrt(2.0)";
22 let res = jl_eval_string(s.as_ptr());
23 assert!(!res.is_null());
24 assert!(jl_exception_occurred().is_null());
25
26 jl_atexit_hook(0);
27 }
28 }
29}