mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-25 16:41:00 +00:00
slight changes to tests
This commit is contained in:
parent
b2fb58559c
commit
02d363daa1
1 changed files with 282 additions and 283 deletions
|
@ -443,21 +443,21 @@ mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_display_and_parse() {
|
|
||||||
macro_rules! generate_tests {
|
macro_rules! generate_tests {
|
||||||
( $( { $media:expr, $string:expr } ),* $(,)* ) => {
|
( $( { $struct:expr, $str:expr } ),+ $(,)* ) => {
|
||||||
|
#[test]
|
||||||
|
fn test_display() {
|
||||||
$(
|
$(
|
||||||
assert_eq!(
|
assert_eq!($struct.to_string(), $str.to_string());
|
||||||
$media.to_string(),
|
)+
|
||||||
$string.to_string()
|
}
|
||||||
);
|
|
||||||
|
|
||||||
assert_eq!(
|
#[test]
|
||||||
$media,
|
fn test_parser() {
|
||||||
$string.parse::<ExtXMedia>().unwrap(),
|
$(
|
||||||
);
|
assert_eq!($struct, $str.parse().unwrap());
|
||||||
)*
|
)+
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -730,7 +730,6 @@ mod test {
|
||||||
ExtXMedia::new(MediaType::Audio, "foo", "bar"),
|
ExtXMedia::new(MediaType::Audio, "foo", "bar"),
|
||||||
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"foo\",NAME=\"bar\""
|
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"foo\",NAME=\"bar\""
|
||||||
},
|
},
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue