58 #include "Mockfassert.h"
59 #include "Mockmxm_cfg.h"
92 TEST_ASSERT_EQUAL(5000u, voltage);
101 TEST_ASSERT_EQUAL(0u, voltage);
108 uint16_t voltage = 0;
110 TEST_ASSERT_EQUAL(2500u, voltage);
114 fas_storeAssertLoc_Ignore();
126 TEST_ASSERT_EQUAL(0u, lsb);
127 TEST_ASSERT_EQUAL(0u, msb);
134 TEST_ASSERT_EQUAL(0xFCu, lsb);
135 TEST_ASSERT_EQUAL(0xFFu, msb);
157 TEST_ASSERT_EQUAL((0x3FFF >> 1u), value_14bit);
162 TEST_ASSERT_EQUAL(0xFCu, lsb);
163 TEST_ASSERT_EQUAL(0x7Fu, msb);
173 TEST_ASSERT_EQUAL((0x1998u >> 2u), value_14bit);
178 TEST_ASSERT_EQUAL(0x98u, lsb);
179 TEST_ASSERT_EQUAL(0x19u, msb);
183 uint16_t voltage = 5000u;
184 uint16_t voltage_result = voltage;
194 TEST_ASSERT_EQUAL(voltage, voltage_result);
198 uint16_t voltage = 0u;
199 uint16_t voltage_result = voltage;
209 TEST_ASSERT_EQUAL(voltage, voltage_result);
213 uint16_t voltage = 4200u;
214 uint16_t voltage_result = voltage;
219 TEST_ASSERT_EQUAL(0x35C1u, converted_voltage);
222 TEST_ASSERT_EQUAL(0x04u, lsb);
223 TEST_ASSERT_EQUAL(0xD7u, msb);
227 TEST_ASSERT_EQUAL(voltage, voltage_result);
235 uint8_t stringNumber = 0u;
236 uint16_t moduleNumberInString = 0u;
242 uint8_t stringNumber = 0u;
243 uint16_t moduleNumberInString = 0u;
249 uint8_t stringNumber = 0u;
250 uint16_t moduleNumberInString = 0u;
257 const uint8_t expectedStringNumber = 0u;
258 uint8_t stringNumber = 42u;
259 const uint16_t expectedModuleNumberInString = 0u;
260 uint16_t moduleNumberInString = 42u;
264 TEST_ASSERT_EQUAL(expectedStringNumber, stringNumber);
265 TEST_ASSERT_EQUAL(expectedModuleNumberInString, moduleNumberInString);
271 TEST_PASS_MESSAGE(
"This test is skipped due to the configuration of the BMS.");
273 const uint8_t expectedStringNumber = 1u;
274 uint8_t stringNumber = 0u;
275 const uint16_t expectedModuleNumberInString = 0u;
276 uint16_t moduleNumberInString = 42u;
280 TEST_ASSERT_EQUAL(expectedStringNumber, stringNumber);
281 TEST_ASSERT_EQUAL(expectedModuleNumberInString, moduleNumberInString);
287 TEST_PASS_MESSAGE(
"This test is skipped due to the configuration of the BMS.");
289 const uint8_t expectedStringNumber = 0u;
290 uint8_t stringNumber = 42u;
291 const uint16_t expectedModuleNumberInString = 1u;
292 uint16_t moduleNumberInString = 42u;
296 &moduleNumberInString));
298 TEST_ASSERT_EQUAL(expectedStringNumber, stringNumber);
299 TEST_ASSERT_EQUAL(expectedModuleNumberInString, moduleNumberInString);
305 TEST_PASS_MESSAGE(
"This test is skipped due to the configuration of the BMS.");
307 const uint8_t expectedStringNumber = 1u;
308 uint8_t stringNumber = 42u;
309 const uint16_t expectedModuleNumberInString = 1u;
310 uint16_t moduleNumberInString = 42u;
314 &moduleNumberInString));
316 TEST_ASSERT_EQUAL(expectedStringNumber, stringNumber);
317 TEST_ASSERT_EQUAL(expectedModuleNumberInString, moduleNumberInString);