2022-07-13 01:17:18 +00:00
|
|
|
use crate::oom_test;
|
2024-07-09 23:51:06 +00:00
|
|
|
use lofty::config::ParseOptions;
|
|
|
|
use lofty::file::AudioFile;
|
2022-07-13 01:17:18 +00:00
|
|
|
use lofty::ogg::VorbisFile;
|
|
|
|
|
2024-08-31 17:38:30 +00:00
|
|
|
#[test_log::test]
|
2022-07-13 01:17:18 +00:00
|
|
|
fn oom1() {
|
|
|
|
oom_test::<VorbisFile>("vorbisfile_read_from/oom-436193bc2d1664b74c19720bef08697d03284f06");
|
|
|
|
}
|
2024-07-09 23:51:06 +00:00
|
|
|
|
2024-08-31 17:38:30 +00:00
|
|
|
#[test_log::test]
|
2024-07-14 19:08:31 +00:00
|
|
|
fn large_allocation() {
|
|
|
|
let mut reader =
|
|
|
|
crate::get_reader("vorbisfile_read_from/move01d_IDX_13_RAND_35154275996070165946691.ogg");
|
|
|
|
let _ = VorbisFile::read_from(&mut reader, ParseOptions::new());
|
|
|
|
}
|
|
|
|
|
2024-08-31 17:38:30 +00:00
|
|
|
#[test_log::test]
|
2024-07-09 23:51:06 +00:00
|
|
|
fn panic1() {
|
|
|
|
let mut reader =
|
|
|
|
crate::get_reader("vorbisfile_read_from/order01d_IDX_32_RAND_22064097693866277502540.ogg");
|
|
|
|
let _ = VorbisFile::read_from(&mut reader, ParseOptions::new());
|
|
|
|
}
|