From 8a790ba71b9b2af5804690e6aa8e099aaf26c2d9 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 24 Feb 2020 18:44:26 +0100 Subject: [PATCH] gremlinvideo: switch to MD5-based testing and add audio test --- nihav-game/src/codecs/gremlinvideo.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/nihav-game/src/codecs/gremlinvideo.rs b/nihav-game/src/codecs/gremlinvideo.rs index 1488b00..c8059fa 100644 --- a/nihav-game/src/codecs/gremlinvideo.rs +++ b/nihav-game/src/codecs/gremlinvideo.rs @@ -562,16 +562,28 @@ pub fn get_decoder_audio() -> Box { mod test { use nihav_core::codecs::RegisteredDecoders; use nihav_core::demuxers::RegisteredDemuxers; - use nihav_codec_support::test::dec_video::test_file_decoding; + use nihav_codec_support::test::dec_video::*; use crate::game_register_all_codecs; use crate::game_register_all_demuxers; + + #[test] + fn test_gdv_video() { + let mut dmx_reg = RegisteredDemuxers::new(); + game_register_all_demuxers(&mut dmx_reg); + let mut dec_reg = RegisteredDecoders::new(); + game_register_all_codecs(&mut dec_reg); + + test_decoding("gdv", "gdv-video", "assets/Game/intro1.gdv", Some(10), &dmx_reg, &dec_reg, + ExpectedTestResult::MD5([0x7ea302bf, 0xc3e210cf, 0x6e341376, 0x9e976056])); + } #[test] - fn test_gdv() { + fn test_gdv_audio() { let mut dmx_reg = RegisteredDemuxers::new(); game_register_all_demuxers(&mut dmx_reg); let mut dec_reg = RegisteredDecoders::new(); game_register_all_codecs(&mut dec_reg); - test_file_decoding("gdv", "assets/Game/intro1.gdv", Some(10), true, false, None, &dmx_reg, &dec_reg); + test_decoding("gdv", "gdv-audio", "assets/Game/intro1.gdv", None, &dmx_reg, &dec_reg, + ExpectedTestResult::MD5([0xd41d8cd9, 0x8f00b204, 0xe9800998, 0xecf8427e])); } } -- 2.39.5