1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-11-22 07:10:59 +00:00

slight changes to tests

This commit is contained in:
Luro02 2020-03-23 12:00:02 +01:00
parent b2fb58559c
commit 02d363daa1
No known key found for this signature in database
GPG key ID: B66FD4F74501A9CF

View file

@ -443,21 +443,21 @@ mod test {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_display_and_parse() {
macro_rules! generate_tests {
( $( { $media:expr, $string:expr } ),* $(,)* ) => {
( $( { $struct:expr, $str:expr } ),+ $(,)* ) => {
#[test]
fn test_display() {
$(
assert_eq!(
$media.to_string(),
$string.to_string()
);
assert_eq!($struct.to_string(), $str.to_string());
)+
}
assert_eq!(
$media,
$string.parse::<ExtXMedia>().unwrap(),
);
)*
#[test]
fn test_parser() {
$(
assert_eq!($struct, $str.parse().unwrap());
)+
}
}
}
@ -730,7 +730,6 @@ mod test {
ExtXMedia::new(MediaType::Audio, "foo", "bar"),
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"foo\",NAME=\"bar\""
},
};
}
#[test]