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

Test for the Maxim 1785x driver tools. More...

#include "unity.h"
#include "Mockfassert.h"
#include "Mockmxm_cfg.h"
#include "mxm_1785x_tools.h"
#include "test_assert_helper.h"
Include dependency graph for test_mxm_1785x_tools.c:

Go to the source code of this file.

Functions

void setUp (void)
 
void tearDown (void)
 
void testMXM_ExtractValueFromRegisterTest (void)
 
void testMXM_ConvertInvalidConversionType (void)
 
void testMXM_ConvertFullScale (void)
 
void testMXM_ConvertLowScale (void)
 
void testMXM_ConvertHalfScale (void)
 
void testMXM_ConvertSelfCheck (void)
 
void testMXM_FirstSetBitTest (void)
 
void testMXM_Unipolar14BitInto16BitWithInput0 (void)
 
void testMXM_Unipolar14BitInto16BitWithInput3FFF (void)
 
void testMXM_VoltageIntoUnipolar14Bit (void)
 
void testScaleAndConvert2500 (void)
 
void testScaleAndConvert500 (void)
 
void testConversionExtractAndInsertRoundTripFullScale (void)
 
void testConversionExtractAndInsertRoundTripNull (void)
 
void testConversionExtractAndInsertRoundTripSomeValue (void)
 
void testMXM_ConvertModuleToStringNullPointer (void)
 
void testMXM_ConvertModuleToStringTooManyForMaxim (void)
 
void testMXM_ConvertModuleToStringTooManyForSystem (void)
 
void testMXM_ConvertModuleToStringFirstInFirstString (void)
 
void testMXM_ConvertModuleToStringFirstInSecondString (void)
 
void testMXM_ConvertModuleToStringSecondInFirstString (void)
 
void testMXM_ConvertModuleToStringSecondInSecondString (void)
 

Detailed Description

Test for the Maxim 1785x driver tools.

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-15 (date of creation)
Updated
2020-07-15 (date of last update)
Prefix
MXM

def

Definition in file test_mxm_1785x_tools.c.

Function Documentation

◆ setUp()

void setUp ( void  )

Definition at line 67 of file test_mxm_1785x_tools.c.

◆ tearDown()

void tearDown ( void  )

Definition at line 70 of file test_mxm_1785x_tools.c.

◆ testConversionExtractAndInsertRoundTripFullScale()

void testConversionExtractAndInsertRoundTripFullScale ( void  )

Definition at line 182 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testConversionExtractAndInsertRoundTripNull()

void testConversionExtractAndInsertRoundTripNull ( void  )

Definition at line 197 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testConversionExtractAndInsertRoundTripSomeValue()

void testConversionExtractAndInsertRoundTripSomeValue ( void  )

Definition at line 212 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertFullScale()

void testMXM_ConvertFullScale ( void  )

Definition at line 86 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertHalfScale()

void testMXM_ConvertHalfScale ( void  )

Definition at line 104 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertInvalidConversionType()

void testMXM_ConvertInvalidConversionType ( void  )

Definition at line 78 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertLowScale()

void testMXM_ConvertLowScale ( void  )

Definition at line 95 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringFirstInFirstString()

void testMXM_ConvertModuleToStringFirstInFirstString ( void  )

Definition at line 256 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringFirstInSecondString()

void testMXM_ConvertModuleToStringFirstInSecondString ( void  )

Definition at line 268 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringNullPointer()

void testMXM_ConvertModuleToStringNullPointer ( void  )

Definition at line 234 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringSecondInFirstString()

void testMXM_ConvertModuleToStringSecondInFirstString ( void  )

Definition at line 284 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringSecondInSecondString()

void testMXM_ConvertModuleToStringSecondInSecondString ( void  )

Definition at line 302 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringTooManyForMaxim()

void testMXM_ConvertModuleToStringTooManyForMaxim ( void  )

Definition at line 241 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertModuleToStringTooManyForSystem()

void testMXM_ConvertModuleToStringTooManyForSystem ( void  )

Definition at line 248 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ConvertSelfCheck()

void testMXM_ConvertSelfCheck ( void  )

Definition at line 113 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_ExtractValueFromRegisterTest()

void testMXM_ExtractValueFromRegisterTest ( void  )

Definition at line 74 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_FirstSetBitTest()

void testMXM_FirstSetBitTest ( void  )

Definition at line 118 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_Unipolar14BitInto16BitWithInput0()

void testMXM_Unipolar14BitInto16BitWithInput0 ( void  )

Definition at line 122 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_Unipolar14BitInto16BitWithInput3FFF()

void testMXM_Unipolar14BitInto16BitWithInput3FFF ( void  )

Definition at line 130 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testMXM_VoltageIntoUnipolar14Bit()

void testMXM_VoltageIntoUnipolar14Bit ( void  )

Definition at line 138 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testScaleAndConvert2500()

void testScaleAndConvert2500 ( void  )

Definition at line 150 of file test_mxm_1785x_tools.c.

Here is the call graph for this function:

◆ testScaleAndConvert500()

void testScaleAndConvert500 ( void  )

Definition at line 166 of file test_mxm_1785x_tools.c.

Here is the call graph for this function: