Skip to content

Commit

Permalink
Add regression test for issue #35
Browse files Browse the repository at this point in the history
Issue #35 was most likely
fixed by commit b312ce4

Now we add a regression test for it.

Closes #35
  • Loading branch information
est31 committed Feb 21, 2019
1 parent 0e71f62 commit 2c64469
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev/cmp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ pub fn get_xiph_asset_defs_5() -> [TestAssetDef; 5] {
/// The test files are licensed under CC-0:
/// * https://github.com/RustAudio/lewton/issues/33#issuecomment-419640709
/// * http://web.archive.org/web/20180910135020/https://github.com/RustAudio/lewton/issues/33
pub fn get_fuzzed_asset_defs() -> [TestAssetDef; 3] {
pub fn get_fuzzed_asset_defs() -> [TestAssetDef; 4] {
return [
TestAssetDef {
filename : format!("27_really_minimized_testcase_crcfix.ogg"),
Expand All @@ -629,5 +629,11 @@ pub fn get_fuzzed_asset_defs() -> [TestAssetDef; 3] {
hash : format!("4812e725d7c6bdb48e745b4e0a396efc96ea5cb30e304cf9710dadda3d963171"),
url : format!("https://github.com/RustAudio/lewton/files/2363173/33_minimized_panic_testcase.ogg.zip"),
},
TestAssetDef {
filename : format!("35_where_did_my_memory_go_repacked.ogg"),
hash : format!("2f202e71ca0440a2de4a15443beae9d3230e81e47bc01d29929fc86ee731887c"),
url : format!("https://github.com/RustAudio/lewton/files/2889595/35_where-did-my-memory-go-repacked.ogg.zip"),
},

];
}
1 change: 1 addition & 0 deletions dev/cmp/tests/fuzzed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn test_malformed_fuzzed() {

ensure_malformed!("27_really_minimized_testcase_crcfix.ogg", BadAudio(AudioBadFormat));
ensure_malformed!("32_minimized_crash_testcase.ogg", BadHeader(HeaderBadFormat));
ensure_malformed!("35_where_did_my_memory_go_repacked.ogg", BadHeader(HeaderBadFormat));
}

#[test]
Expand Down

0 comments on commit 2c64469

Please sign in to comment.