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:
parent
b2fb58559c
commit
02d363daa1
1 changed files with 282 additions and 283 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue