Maraiah/tests/pict.rs

24 lines
480 B
Rust
Raw Normal View History

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()
{
const INPUT: &[u8] = include_bytes!("data/clut.in");
const OUTPUT: [Color8; 256] = include!("data/clut.out");
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