From 1c73affe0f6600a10b328cecabbb06db81eeb53e Mon Sep 17 00:00:00 2001 From: Michael Aebli Date: Tue, 1 Oct 2024 12:32:24 +0200 Subject: [PATCH] fixing tests --- src/user_data/value_information.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/user_data/value_information.rs b/src/user_data/value_information.rs index e25fdb3..92bbced 100644 --- a/src/user_data/value_information.rs +++ b/src/user_data/value_information.rs @@ -1202,7 +1202,11 @@ mod tests { x.push(unit!(Meter ^ 3)); x }, - labels: ArrayVec::::new() + labels: { + let mut x = ArrayVec::::new(); + x.push(ValueLabel::Volume); + x + } } ); @@ -1228,7 +1232,12 @@ mod tests { x.push(unit!(Meter ^ 3)); x }, - labels: ArrayVec::::new() + + labels: { + let mut x = ArrayVec::::new(); + x.push(ValueLabel::Volume); + x + } } ); @@ -1254,7 +1263,11 @@ mod tests { x.push(unit!(Meter ^ 3)); x }, - labels: ArrayVec::::new() + labels: { + let mut x = ArrayVec::::new(); + x.push(ValueLabel::Volume); + x + } } ); @@ -1290,6 +1303,7 @@ mod tests { assert_eq!(result.value_information, ValueInformationField::from(0x96)); assert_eq!(ValueInformation::try_from(&result).unwrap().labels, { let mut x = ArrayVec::::new(); + x.push(ValueLabel::Volume); x.push(ValueLabel::Averaged); x }); @@ -1308,6 +1322,7 @@ mod tests { ValueInformation { labels: { let mut x = ArrayVec::::new(); + x.push(ValueLabel::Volume); x.push(ValueLabel::Averaged); x }, @@ -1337,6 +1352,7 @@ mod tests { ValueInformation { labels: { let mut x = ArrayVec::::new(); + x.push(ValueLabel::Volume); x.push(ValueLabel::Averaged); x },