diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2,10 +2,15 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] +#[cfg(not(feature = "bindgen"))] mod ffi; +#[cfg(not(feature = "bindgen"))] pub use crate::ffi::*; +#[cfg(feature = "bindgen")] +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); + #[cfg(test)] mod tests { use super::*; @@ -22,8 +27,9 @@ mod tests { fn login() { unsafe { // Unconnected - assert_eq!(0, NK_login(CString::new("S").unwrap().as_ptr())); + assert_eq!(0, NK_login(CString::new("L").unwrap().as_ptr())); assert_eq!(0, NK_login(CString::new("P").unwrap().as_ptr())); + assert_eq!(0, NK_login(CString::new("S").unwrap().as_ptr())); // Unsupported model assert_eq!(0, NK_login(CString::new("T").unwrap().as_ptr())); } |