diff --git a/testing/can-messages/tests/all.rs b/testing/can-messages/tests/all.rs index 2a3d2ab..db5798e 100644 --- a/testing/can-messages/tests/all.rs +++ b/testing/can-messages/tests/all.rs @@ -2,7 +2,7 @@ use can_messages::{ Amet, Bar, BarThree, CanError, Foo, LargerIntsWithOffsets, MultiplexTest, - MultiplexTestMultiplexorIndex, MultiplexTestMultiplexorM0, NegativeFactorTest, + MultiplexTestMultiplexorIndex, MultiplexTestMultiplexorM0, NegativeFactorTest, NoMinMax, }; #[test] @@ -20,6 +20,15 @@ fn check_range_value_valid() { assert!(result.is_ok()); } +#[test] +fn check_min_max_zero_disables_range_check() { + let result = NoMinMax::new(10); + assert!( + result.is_ok(), + "This should be valid. The min and max are 0 in the DBC which disables range checking." + ); +} + #[test] fn check_min_max_values() { // min/max copy-pasted from example.dbc: diff --git a/testing/dbc-examples/example.dbc b/testing/dbc-examples/example.dbc index 1c90f45..023c383 100644 --- a/testing/dbc-examples/example.dbc +++ b/testing/dbc-examples/example.dbc @@ -8,6 +8,8 @@ BS_: BU_: Lorem Ipsum Dolor +BO_ 1345 NoMinMax: 1 Vector__XXX + SG_ NoMinMaxSignal : 0|8@1- (1,0) [0|0] "" Vector__XXX BO_ 256 Foo: 4 Lorem SG_ Voltage : 16|16@1+ (0.000976562,0) [0E-009|63.9990234375] "V" Vector__XXX SG_ Current : 0|16@1- (0.0625,0) [-2048|2047.9375] "A" Vector__XXX