From 9cfa003f48c52c4327dafa5788873df5f9418480 Mon Sep 17 00:00:00 2001 From: Serial <69764315+Serial-ATA@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:28:54 -0400 Subject: [PATCH] Tests: Convert EBML tests to `test_log` --- lofty/src/ebml/vint.rs | 10 +++++----- lofty/tests/files/matroska.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lofty/src/ebml/vint.rs b/lofty/src/ebml/vint.rs index ca733b96..e555f6a1 100644 --- a/lofty/src/ebml/vint.rs +++ b/lofty/src/ebml/vint.rs @@ -327,7 +327,7 @@ mod tests { ], ]; - #[test] + #[test_log::test] fn bytes_to_vint() { for representation in VALID_REPRESENTATIONS_OF_2 { assert_eq!( @@ -339,7 +339,7 @@ mod tests { } } - #[test] + #[test_log::test] fn vint_to_bytes() { for representation in VALID_REPRESENTATIONS_OF_2 { let vint = VInt::parse(&mut Cursor::new(representation), 8).unwrap(); @@ -350,7 +350,7 @@ mod tests { } } - #[test] + #[test_log::test] fn large_integers_should_fail() { assert!(VInt::from_u64(u64::MAX).is_err()); @@ -361,12 +361,12 @@ mod tests { } } - #[test] + #[test_log::test] fn maximum_possible_representable_vint() { assert!(VInt::from_u64(u64::MAX >> 8).is_ok()); } - #[test] + #[test_log::test] fn octet_lengths() { let n = u64::MAX >> 8; for i in 1u8..=7 { diff --git a/lofty/tests/files/matroska.rs b/lofty/tests/files/matroska.rs index f535f8a7..8b2d4309 100644 --- a/lofty/tests/files/matroska.rs +++ b/lofty/tests/files/matroska.rs @@ -7,7 +7,7 @@ use lofty::tag::TagType; use std::io::Seek; -#[test] +#[test_log::test] fn read() { // This file contains a tags element let file = Probe::open("tests/files/assets/minimal/full_test.mka") @@ -22,7 +22,7 @@ fn read() { crate::verify_artist!(file, primary_tag, "Foo artist", 1); } -#[test] +#[test_log::test] fn write() { let mut file = temp_file!("tests/files/assets/minimal/full_test.mka"); @@ -51,17 +51,17 @@ fn write() { crate::set_artist!(tagged_file, tag_mut, TagType::Ebml, "Bar artist", 1 => file, "Foo artist"); } -#[test] +#[test_log::test] fn remove() { crate::remove_tag!("tests/files/assets/minimal/full_test.mka", TagType::Ebml); } -#[test] +#[test_log::test] fn read_no_properties() { crate::no_properties_test!("tests/files/assets/minimal/full_test.mka"); } -#[test] +#[test_log::test] fn read_no_tags() { crate::no_tag_test!("tests/files/assets/minimal/full_test.mka"); }