Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maebli committed Oct 1, 2024
1 parent 8c066b7 commit 1c73aff
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/user_data/value_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,11 @@ mod tests {
x.push(unit!(Meter ^ 3));
x
},
labels: ArrayVec::<ValueLabel, 10>::new()
labels: {
let mut x = ArrayVec::<ValueLabel, 10>::new();
x.push(ValueLabel::Volume);
x
}
}
);

Expand All @@ -1228,7 +1232,12 @@ mod tests {
x.push(unit!(Meter ^ 3));
x
},
labels: ArrayVec::<ValueLabel, 10>::new()

labels: {
let mut x = ArrayVec::<ValueLabel, 10>::new();
x.push(ValueLabel::Volume);
x
}
}
);

Expand All @@ -1254,7 +1263,11 @@ mod tests {
x.push(unit!(Meter ^ 3));
x
},
labels: ArrayVec::<ValueLabel, 10>::new()
labels: {
let mut x = ArrayVec::<ValueLabel, 10>::new();
x.push(ValueLabel::Volume);
x
}
}
);

Expand Down Expand Up @@ -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::<ValueLabel, 10>::new();
x.push(ValueLabel::Volume);
x.push(ValueLabel::Averaged);
x
});
Expand All @@ -1308,6 +1322,7 @@ mod tests {
ValueInformation {
labels: {
let mut x = ArrayVec::<ValueLabel, 10>::new();
x.push(ValueLabel::Volume);
x.push(ValueLabel::Averaged);
x
},
Expand Down Expand Up @@ -1337,6 +1352,7 @@ mod tests {
ValueInformation {
labels: {
let mut x = ArrayVec::<ValueLabel, 10>::new();
x.push(ValueLabel::Volume);
x.push(ValueLabel::Averaged);
x
},
Expand Down

0 comments on commit 1c73aff

Please sign in to comment.