2019-03-04 20:57:25 -08:00
|
|
|
use maraiah::{durandal::image::Color8, marathon::pict};
|
|
|
|
|
|
|
|
include!("data/rand.rs");
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn get_clut_must_process()
|
|
|
|
{
|
2019-03-12 13:28:08 -07:00
|
|
|
const INPUT: &[u8] = include_bytes!("data/pict/clut.in");
|
|
|
|
const OUTPUT: [Color8; 256] = include!("data/pict/clut.out");
|
2019-03-04 20:57:25 -08:00
|
|
|
|
|
|
|
assert_eq!(pict::get_clut(INPUT).unwrap(), (OUTPUT.to_vec(), 2056));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn pict_must_not_process()
|
|
|
|
{
|
|
|
|
for inp in &RANDOM {
|
|
|
|
assert!(pict::get_clut(inp).is_err());
|
|
|
|
assert!(pict::load_pict(inp).is_err());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// EOF
|