add shapes decompression test

png-branch
an 2019-03-12 06:21:42 -04:00
parent 0c0591f5ce
commit dcf0f9e22f
4 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Some of the data contained in tests/data and benches/data is
Copyright © Bungie Software. I do not own them, but am permitted to
redistribute them. Everything else is:
To the extent possible under law, I, Alison Sanderson, have waived all To the extent possible under law, I, Alison Sanderson, have waived all
copyright and related or neighboring rights to this Document as described by copyright and related or neighboring rights to this Document as described by
the Creative Commons Zero license as follows: the Creative Commons Zero license as follows:

BIN
tests/data/Shapes.in Normal file

Binary file not shown.

BIN
tests/data/Shapes.out Normal file

Binary file not shown.

View File

@ -22,6 +22,16 @@ fn defl_alice()
assert_eq!(defl::load_deflate(b).unwrap().1, OUT.to_vec()); assert_eq!(defl::load_deflate(b).unwrap().1, OUT.to_vec());
} }
#[test]
fn defl_shapes()
{
const INPUT: &[u8] = include_bytes!("data/Shapes.in");
const OUTPUT: &[u8] = include_bytes!("data/Shapes.out");
let b = &INPUT[defl::load_gzip_header(INPUT).unwrap()..];
assert_eq!(defl::load_deflate(b).unwrap().1, OUTPUT.to_vec());
}
#[test] #[test]
fn defl_must_succeed() fn defl_must_succeed()
{ {