Skip to content

Commit

Permalink
Merge pull request #90 from projectgus/bugfix/test_source
Browse files Browse the repository at this point in the history
tests: Fix generated messages.rs changed in 27fc4cc
  • Loading branch information
linusharberg authored Dec 2, 2024
2 parents af7cbf3 + e2aecee commit ee528bd
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions testing/can-messages/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ impl Bar {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: Bar::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -454,7 +454,7 @@ impl Bar {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: Bar::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -507,7 +507,7 @@ impl Bar {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: Bar::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -769,7 +769,7 @@ impl X4wd {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: X4wd::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -945,7 +945,7 @@ impl Amet {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: Amet::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1034,7 +1034,7 @@ impl Amet {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: Amet::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1079,7 +1079,7 @@ impl Amet {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: Amet::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1447,7 +1447,7 @@ impl MultiplexTest {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: MultiplexTest::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1512,7 +1512,7 @@ impl MultiplexTest {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: MultiplexTest::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1879,7 +1879,7 @@ impl IntegerFactorOffset {
}
let factor = 1;
let value = value.checked_sub(1).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: IntegerFactorOffset::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1924,7 +1924,7 @@ impl IntegerFactorOffset {
}
let factor = 4;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: IntegerFactorOffset::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -1969,7 +1969,7 @@ impl IntegerFactorOffset {
}
let factor = 2;
let value = value.checked_sub(16).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: IntegerFactorOffset::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -2014,7 +2014,7 @@ impl IntegerFactorOffset {
}
let factor = 1;
let value = value.checked_add(1).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: IntegerFactorOffset::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -2059,7 +2059,7 @@ impl IntegerFactorOffset {
}
let factor = 1;
let value = value.checked_add(1).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: IntegerFactorOffset::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down Expand Up @@ -2230,7 +2230,7 @@ impl NegativeFactorTest {
}
let factor = -1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: NegativeFactorTest::MESSAGE_ID,
})?;
let value = (value / factor) as u16;

Expand Down Expand Up @@ -2276,7 +2276,7 @@ impl NegativeFactorTest {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: NegativeFactorTest::MESSAGE_ID,
})?;
let value = (value / factor) as i16;

Expand Down Expand Up @@ -2438,7 +2438,7 @@ impl LargerIntsWithOffsets {
let value = value
.checked_add(1000)
.ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: LargerIntsWithOffsets::MESSAGE_ID,
})?;
let value = (value / factor) as u16;

Expand Down Expand Up @@ -2487,7 +2487,7 @@ impl LargerIntsWithOffsets {
let value = value
.checked_add(1000)
.ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: LargerIntsWithOffsets::MESSAGE_ID,
})?;
let value = (value / factor) as u16;

Expand Down Expand Up @@ -2730,7 +2730,7 @@ impl TruncatedBeSignal {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: TruncatedBeSignal::MESSAGE_ID,
})?;
let value = (value / factor) as i16;

Expand Down Expand Up @@ -2877,7 +2877,7 @@ impl TruncatedLeSignal {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: TruncatedLeSignal::MESSAGE_ID,
})?;
let value = (value / factor) as i16;

Expand Down Expand Up @@ -3023,7 +3023,7 @@ impl MsgExtendedId {
}
let factor = 1;
let value = value.checked_sub(0).ok_or(CanError::ParameterOutOfRange {
message_id: Self::MESSAGE_ID,
message_id: MsgExtendedId::MESSAGE_ID,
})?;
let value = (value / factor) as u8;

Expand Down

0 comments on commit ee528bd

Please sign in to comment.