foxBMS - Unit Tests  1.1.0
The foxBMS Unit Tests API Documentation
test_mxm_registry.c File Reference

Test for the Maxim registry tool. More...

#include "unity.h"
#include "Mockfassert.h"
#include "Mockmxm_1785x.h"
#include "Mockmxm_basic_defines.h"
#include "mxm_1785x_tools.h"
#include "mxm_registry.h"
#include "test_assert_helper.h"
Include dependency graph for test_mxm_registry.c:

Go to the source code of this file.

Functions

static void rxBufferFillAscending (MXM_MONITORING_INSTANCE_s *pState)
 
void setUp (void)
 
void tearDown (void)
 
void testRegistryInitiated (void)
 
void testMXM_MonRegistryInitNullPointer (void)
 
void testMXM_MonRegistryConnectDevicesNullPointer (void)
 
void testRegistryConnectDevices (void)
 
void testRegistryConnectDevicesInvalidNumber (void)
 
void testMXM_MonRegistryGetHighestConnected5XDeviceNullPointer (void)
 
void testHighest5X (void)
 
void testMXM_MonRegistryParseIdIntoDevicesNullPointer (void)
 
void testMXM_MonRegistryParseIdIntoDevicesInvalidRegister (void)
 
void testMXM_MonRegistryParseIdIntoDevicesValidRegister (void)
 
void testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId1 (void)
 
void testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId1 (void)
 
void testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId2 (void)
 
void testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId2 (void)
 
void testMXM_MonRegistryParseVersionIntoDevicesNullPointer (void)
 
void testMXM_MonRegistryParseVersionIntoDevicesCheckAscendingBuffer (void)
 
void testMXM_MonRegistryParseVersionIntoDevicesWrongBufferLength (void)
 

Variables

static MXM_MONITORING_INSTANCE_s mxm_state
 

Detailed Description

Test for the Maxim registry tool.

SPDX-License-Identifier: BSD-3-Clause

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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®″
Author
foxBMS Team
Date
2020-07-16 (date of creation)
Updated
2020-07-16 (date of last update)
Prefix
MXM

def

Definition in file test_mxm_registry.c.

Function Documentation

◆ rxBufferFillAscending()

static void rxBufferFillAscending ( MXM_MONITORING_INSTANCE_s pState)
static

Definition at line 101 of file test_mxm_registry.c.

◆ setUp()

void setUp ( void  )

Definition at line 109 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ tearDown()

void tearDown ( void  )

Definition at line 114 of file test_mxm_registry.c.

◆ testHighest5X()

void testHighest5X ( void  )

Definition at line 173 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryConnectDevicesNullPointer()

void testMXM_MonRegistryConnectDevicesNullPointer ( void  )

Definition at line 152 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryGetHighestConnected5XDeviceNullPointer()

void testMXM_MonRegistryGetHighestConnected5XDeviceNullPointer ( void  )

Definition at line 169 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryInitNullPointer()

void testMXM_MonRegistryInitNullPointer ( void  )

Definition at line 148 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId1()

void testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId1 ( void  )

Definition at line 193 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId2()

void testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId2 ( void  )

Definition at line 215 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesInvalidRegister()

void testMXM_MonRegistryParseIdIntoDevicesInvalidRegister ( void  )

Definition at line 183 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesNullPointer()

void testMXM_MonRegistryParseIdIntoDevicesNullPointer ( void  )

Definition at line 179 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesValidRegister()

void testMXM_MonRegistryParseIdIntoDevicesValidRegister ( void  )

Definition at line 188 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId1()

void testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId1 ( void  )

Definition at line 206 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId2()

void testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId2 ( void  )

Definition at line 228 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseVersionIntoDevicesCheckAscendingBuffer()

void testMXM_MonRegistryParseVersionIntoDevicesCheckAscendingBuffer ( void  )

Definition at line 241 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseVersionIntoDevicesNullPointer()

void testMXM_MonRegistryParseVersionIntoDevicesNullPointer ( void  )

Definition at line 237 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testMXM_MonRegistryParseVersionIntoDevicesWrongBufferLength()

void testMXM_MonRegistryParseVersionIntoDevicesWrongBufferLength ( void  )

Definition at line 254 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testRegistryConnectDevices()

void testRegistryConnectDevices ( void  )

Definition at line 156 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testRegistryConnectDevicesInvalidNumber()

void testRegistryConnectDevicesInvalidNumber ( void  )

Definition at line 165 of file test_mxm_registry.c.

Here is the call graph for this function:

◆ testRegistryInitiated()

void testRegistryInitiated ( void  )

Definition at line 118 of file test_mxm_registry.c.

Here is the call graph for this function:

Variable Documentation

◆ mxm_state

MXM_MONITORING_INSTANCE_s mxm_state
static

Definition at line 67 of file test_mxm_registry.c.