forked from mirrors/gstreamer-rs
gstreamer: Fix serde serialization tests
ron serialization is now writing `1.0` instead of just `1`.
This commit is contained in:
parent
6b47d646c0
commit
b28664ccbd
5 changed files with 12 additions and 12 deletions
|
@ -182,7 +182,7 @@ mod tests {
|
|||
let datetime = DateTime::new(2f32, 2018, 5, 28, 16, 6, 42.123_456f64).unwrap();
|
||||
let res = ron::ser::to_string_pretty(&datetime, pretty_config.clone());
|
||||
assert_eq!(
|
||||
Ok("YMDhmsTz(2018, 5, 28, 16, 6, 42.123456, 2)".to_owned()),
|
||||
Ok("YMDhmsTz(2018, 5, 28, 16, 6, 42.123456, 2.0)".to_owned()),
|
||||
res,
|
||||
);
|
||||
|
||||
|
@ -194,7 +194,7 @@ mod tests {
|
|||
|
||||
let datetime = DateTime::new(2f32, 2018, 5, 28, 16, 6, None).unwrap();
|
||||
let res = ron::ser::to_string_pretty(&datetime, pretty_config.clone());
|
||||
assert_eq!(Ok("YMDhmTz(2018, 5, 28, 16, 6, 2)".to_owned()), res,);
|
||||
assert_eq!(Ok("YMDhmTz(2018, 5, 28, 16, 6, 2.0)".to_owned()), res,);
|
||||
|
||||
let datetime = DateTime::from_ymd(2018, 5, 28).unwrap();
|
||||
let res = ron::ser::to_string_pretty(&datetime, pretty_config.clone());
|
||||
|
|
|
@ -154,7 +154,7 @@ mod tests {
|
|||
" ])),",
|
||||
" segment: Some((",
|
||||
" flags: \"reset+segment\",",
|
||||
" rate: 1,",
|
||||
" rate: 1.0,",
|
||||
" applied_rate: 0.9,",
|
||||
" format: Time,",
|
||||
" base: 123,",
|
||||
|
@ -205,8 +205,8 @@ mod tests {
|
|||
" caps: None,",
|
||||
" segment: Some((",
|
||||
" flags: \"\",",
|
||||
" rate: 1,",
|
||||
" applied_rate: 1,",
|
||||
" rate: 1.0,",
|
||||
" applied_rate: 1.0,",
|
||||
" format: Time,",
|
||||
" base: 0,",
|
||||
" offset: 0,",
|
||||
|
|
|
@ -139,7 +139,7 @@ mod tests {
|
|||
Ok(concat!(
|
||||
"(",
|
||||
" flags: \"reset+segment\",",
|
||||
" rate: 1,",
|
||||
" rate: 1.0,",
|
||||
" applied_rate: 0.9,",
|
||||
" format: Time,",
|
||||
" base: 123,",
|
||||
|
|
|
@ -199,7 +199,7 @@ mod tests {
|
|||
r#" ("f3", "i32", 123),"#,
|
||||
r#" ("fraction", "Fraction", (1, 2)),"#,
|
||||
r#" ("date", "Date", Some(YMD(2019, 8, 19))),"#,
|
||||
r#" ("date_time", "DateTime", Some(YMDhmsTz(2019, 8, 19, 13, 34, 42, 2))),"#,
|
||||
r#" ("date_time", "DateTime", Some(YMDhmsTz(2019, 8, 19, 13, 34, 42.0, 2.0))),"#,
|
||||
r#" ("array", "Array", ["#,
|
||||
r#" ("i32", 1),"#,
|
||||
r#" ("i32", 2),"#,
|
||||
|
|
|
@ -371,7 +371,7 @@ mod tests {
|
|||
r#" 96000,"#,
|
||||
r#" ]),"#,
|
||||
r#" ("replaygain-track-gain", ["#,
|
||||
r#" 1,"#,
|
||||
r#" 1.0,"#,
|
||||
r#" ]),"#,
|
||||
r#" ("date", ["#,
|
||||
r#" YMD(2018, 5, 28),"#,
|
||||
|
@ -394,8 +394,8 @@ mod tests {
|
|||
r#" caps: None,"#,
|
||||
r#" segment: Some(("#,
|
||||
r#" flags: "","#,
|
||||
r#" rate: 1,"#,
|
||||
r#" applied_rate: 1,"#,
|
||||
r#" rate: 1.0,"#,
|
||||
r#" applied_rate: 1.0,"#,
|
||||
r#" format: Time,"#,
|
||||
r#" base: 0,"#,
|
||||
r#" offset: 0,"#,
|
||||
|
@ -430,7 +430,7 @@ mod tests {
|
|||
]),
|
||||
("duration", [120000000000]),
|
||||
("bitrate", [96000]),
|
||||
("replaygain-track-gain", [1]),
|
||||
("replaygain-track-gain", [1.0]),
|
||||
("date", [
|
||||
YMD(2018, 5, 28),
|
||||
]),
|
||||
|
@ -491,7 +491,7 @@ mod tests {
|
|||
["title", ["a title", "another title"]],
|
||||
["duration", [120000000000]],
|
||||
["bitrate", [96000]],
|
||||
["replaygain-track-gain", [1.0]],
|
||||
["replaygain-track-gain", [1]],
|
||||
["date",[{"YMD":[2018,5,28]}]],
|
||||
["datetime",[{"YMD":[2018,5,28]}]],
|
||||
["image",[{"buffer":{"pts":null,"dts":null,"duration":null,"offset":0,"offset_end":0,"flags":"","buffer":[1,2,3,4]},"buffer_list":null,"caps":null,"segment":null,"info":null}]]
|
||||
|
|
Loading…
Reference in a new issue