foxBMS-UnitTests
1.0.0
The foxBMS Unit Tests API Documentation
|
Tests for the CAN driver. More...
#include "unity.h"
#include "MockHL_can.h"
#include "Mockcan_cfg.h"
#include "Mockdatabase.h"
#include "Mockdiag.h"
#include "Mockfoxmath.h"
#include "Mockio.h"
#include "Mockmcu.h"
#include "Mockos.h"
#include "can.h"
#include "test_assert_helper.h"
Go to the source code of this file.
Functions | |
static uint32_t | can_dummy (uint32_t id, uint8_t dlc, CAN_byteOrder_e byteOrder, uint8_t *canData) |
void | setUp (void) |
void | tearDown (void) |
void | testDataSendNullPointerAsNode (void) |
void | testDataSendNullPointerAsData (void) |
void | testDataSendNoMessagePending (void) |
void | testDataSendMessagePending (void) |
void | testEnablePeriodic (void) |
void | testIsCurrentSensorPresent (void) |
void | testIsCurrentSensorCcPresent (void) |
Variables | |
const CAN_MSG_TX_TYPE_s | can_txMessages [] |
const CAN_MSG_RX_TYPE_s | can_rxMessages [] |
const uint8_t | can_txLength = sizeof(can_txMessages) / sizeof(can_txMessages[0]) |
const uint8_t | can_rxLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0]) |
CAN_STATE_s * | canTestState = NULL_PTR |
Tests for the CAN driver.
BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
″This product uses parts of foxBMS®″
″This product includes parts of foxBMS®″
″This product is derived from foxBMS®″
Definition in file test_can.c.
|
static |
Definition at line 71 of file test_can.c.
void setUp | ( | void | ) |
void tearDown | ( | void | ) |
Definition at line 100 of file test_can.c.
void testDataSendMessagePending | ( | void | ) |
void testDataSendNoMessagePending | ( | void | ) |
void testDataSendNullPointerAsData | ( | void | ) |
void testDataSendNullPointerAsNode | ( | void | ) |
void testEnablePeriodic | ( | void | ) |
void testIsCurrentSensorCcPresent | ( | void | ) |
void testIsCurrentSensorPresent | ( | void | ) |
const uint8_t can_rxLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0]) |
Definition at line 84 of file test_can.c.
const CAN_MSG_RX_TYPE_s can_rxMessages[] |
registry of CAN RX messages
Definition at line 79 of file test_can.c.
const uint8_t can_txLength = sizeof(can_txMessages) / sizeof(can_txMessages[0]) |
array length for transmission CAN0 message definition
length of CAN message arrays
Definition at line 83 of file test_can.c.
const CAN_MSG_TX_TYPE_s can_txMessages[] |
registry of CAN TX messages
Definition at line 75 of file test_can.c.
CAN_STATE_s* canTestState = NULL_PTR |
Definition at line 86 of file test_can.c.