Skip to content

Commit

Permalink
Use better literal representations in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lautat committed Aug 9, 2023
1 parent 8ba069c commit 0c92b4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/formats/v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ mod tests {
test min_values {
values: SensorValues::from(&MIN_VALUES),
expected: {
acceleration_vector_as_milli_g: Some(AccelerationVector(-32_767, -32_767, -32_767)),
acceleration_vector_as_milli_g: Some(AccelerationVector(-0x7FFF, -0x7FFF, -0x7FFF)),
battery_potential_as_millivolts: Some(1_600),
humidity_as_ppm: Some(0),
measurement_sequence_number: Some(0),
Expand All @@ -243,10 +243,10 @@ mod tests {
test max_values {
values: SensorValues::from(&MAX_VALUES),
expected: {
acceleration_vector_as_milli_g: Some(AccelerationVector(32_767, 32_767, 32_767)),
acceleration_vector_as_milli_g: Some(AccelerationVector(0x7FFF, 0x7FFF, 0x7FFF)),
battery_potential_as_millivolts: Some(3_646),
humidity_as_ppm: Some(1_638_350),
measurement_sequence_number: Some(65_534),
measurement_sequence_number: Some(0xFFFE),
movement_counter: Some(254),
pressure_as_pascals: Some(115_534),
temperature_as_millicelsius: Some(163_835),
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Deserialization is implemented with [Serde][3], and requires `gateway` feature t
clippy::as_conversions,
clippy::assertions_on_result_states,
clippy::cargo,
clippy::decimal_literal_representation,
clippy::pedantic,
clippy::self_named_module_files,
clippy::unwrap_used,
Expand Down

0 comments on commit 0c92b4f

Please sign in to comment.