Basic sanity check test

This commit is contained in:
Rafael Caricio 2020-04-10 20:53:41 +02:00
parent d1d4d59321
commit 35dbaaf3e8

View file

@ -3,3 +3,21 @@
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs")); include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn basic_sanity_check() {
unsafe {
lv_init();
let hres = lv_disp_get_hor_res(std::ptr::null_mut());
assert_eq!(hres, 480);
let vres = lv_disp_get_ver_res(std::ptr::null_mut());
assert_eq!(vres, 320);
}
}
}