57 #include "Mockdatabase.h"
59 #include "Mockfoxmath.h"
61 #include "Mockmpu_prototypes.h"
84 uint64_t bitStart = 0;
85 uint8_t bitLength = 0;
86 uint64_t canSignal = 0;
105 uint64_t message = 0;
106 uint64_t bitStart = 0;
107 uint8_t bitLength = 63;
108 uint64_t canSignal = UINT64_MAX >> 1u;
113 TEST_ASSERT_EQUAL_UINT64(canSignal, message);
118 canSignal = UINT64_MAX;
123 TEST_ASSERT_EQUAL_UINT64(canSignal, message);
133 TEST_ASSERT_EQUAL_UINT64(canSignal, message);
143 TEST_ASSERT_EQUAL_UINT64(canSignal, message);
148 canSignal = UINT64_MAX;
153 TEST_ASSERT_EQUAL_UINT64(0x7u, message);
163 TEST_ASSERT_EQUAL_UINT64(0x60u, message);
168 uint64_t message = 0;
169 uint64_t bitStart = 0;
170 uint8_t bitLength = 0;
171 uint64_t pCanSignal = 0;
190 uint64_t message = UINT64_MAX >> 1u;
191 uint64_t bitStart = 0;
192 uint8_t bitLength = 63;
193 uint64_t canSignal = 0;
198 TEST_ASSERT_EQUAL_UINT64(message, canSignal);
200 message = UINT64_MAX;
208 TEST_ASSERT_EQUAL_UINT64(message, canSignal);
218 TEST_ASSERT_EQUAL_UINT64(message, canSignal);
228 TEST_ASSERT_EQUAL_UINT64(message, canSignal);
230 message = UINT64_MAX;
238 TEST_ASSERT_EQUAL_UINT64(0x7u, canSignal);
248 TEST_ASSERT_EQUAL_UINT64(0x3u, canSignal);
enum CAN_ENDIANNESS CAN_ENDIANNESS_e
void CAN_TxSetMessageDataWithSignalData(uint64_t *pMessage, uint64_t bitStart, uint8_t bitLength, uint64_t canSignal, CAN_ENDIANNESS_e endianness)
Puts CAN signal data in a 64-bit variable. This function is used to compose a 64-bit CAN message....
void CAN_RxGetSignalDataFromMessageData(uint64_t message, uint64_t bitStart, uint8_t bitLength, uint64_t *pCanSignal, CAN_ENDIANNESS_e endianness)
Gets CAN signal data from a 64-bit variable. This function is used to get signal data from a 64-bit C...
Headers for the helper functions for the CAN module.
Database configuration header.
#define NULL_PTR
Null pointer.
#define TEST_ASSERT_PASS_ASSERT(_code_under_test)
assert whether assert macro has passed
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
void testCAN_RxGetSignalDataFromMessageData64BitMessage(void)
void testCAN_RxGetSignalDataFromMessageDataInterfaceNullPointer(void)
void testCAN_TxSetMessageDataWithSignalDataInterfaceNullPointer(void)
void testCAN_TxSetMessageDataWithSignalData64BitMessage(void)