mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 09:31:06 +00:00
gstreamer: Fix serde serialization tests
ron serialization is now writing `1.0` instead of just `1`.
This commit is contained in:
parent
4cefe838f1
commit
62a2ad8a1e
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());
|
||||
|
|
|
@ -158,7 +158,7 @@ mod tests {
|
|||
" flags: (",
|
||||
" bits: 9,",
|
||||
" ),",
|
||||
" rate: 1,",
|
||||
" rate: 1.0,",
|
||||
" applied_rate: 0.9,",
|
||||
" format: Time,",
|
||||
" base: 123,",
|
||||
|
@ -213,8 +213,8 @@ mod tests {
|
|||
" flags: (",
|
||||
" bits: 0,",
|
||||
" ),",
|
||||
" rate: 1,",
|
||||
" applied_rate: 1,",
|
||||
" rate: 1.0,",
|
||||
" applied_rate: 1.0,",
|
||||
" format: Time,",
|
||||
" base: 0,",
|
||||
" offset: 0,",
|
||||
|
|
|
@ -141,7 +141,7 @@ mod tests {
|
|||
" flags: (",
|
||||
" bits: 9,",
|
||||
" ),",
|
||||
" 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),"#,
|
||||
|
@ -398,8 +398,8 @@ mod tests {
|
|||
r#" flags: ("#,
|
||||
r#" bits: 0,"#,
|
||||
r#" ),"#,
|
||||
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,"#,
|
||||
|
@ -434,7 +434,7 @@ mod tests {
|
|||
]),
|
||||
("duration", [120000000000]),
|
||||
("bitrate", [96000]),
|
||||
("replaygain-track-gain", [1]),
|
||||
("replaygain-track-gain", [1.0]),
|
||||
("date", [
|
||||
YMD(2018, 5, 28),
|
||||
]),
|
||||
|
@ -497,7 +497,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":{"bits":0},"buffer":[1,2,3,4]},"buffer_list":null,"caps":null,"segment":null,"info":null}]]
|
||||
|
|
Loading…
Reference in a new issue