Skip to content

Commit

Permalink
Fix nasa#596, remove now-unused assert functions (final)
Browse files Browse the repository at this point in the history
Clean up the assert functions and macros which are no longer
used after updating all coverage tests to use preferred macros.
  • Loading branch information
jphickey committed Jun 22, 2021
1 parent 2f58665 commit 90b9c39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 64 deletions.
53 changes: 0 additions & 53 deletions modules/core_private/ut-stubs/inc/ut_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,43 +235,6 @@ void UT_ResetCDS(void);
/* Reset pool buffer array index */
void UT_ResetPoolBufferIndex(void);

/*****************************************************************************/
/**
** \brief Output single test's pass/fail status
**
** \par Description
** Out the results and description for a single test, and update the
** pass/fail counters.
**
** \par Assumptions, External Events, and Notes:
**
** \param[in] test Equals 0 if the test failed; non-zero if the
** test passed
**
** \param[in] fun_name Character string pointer to the name of the function
** being tested
**
** \param[in] info Character string pointer to the description of the test
**
** \returns
** This function does not return a value.
**
******************************************************************************/
void UT_Report(const char *file, uint32 line, bool test, const char *fun_name, const char *info);

/*****************************************************************************/
/**
** \brief Test pass/fail summary
**
** \par Description
** Output total number of tests passed and failed.
**
** \returns
** This function does not return a value.
**
******************************************************************************/
void UT_ReportFailures(void);

/*****************************************************************************/
/**
** \brief Send a message via the software bus
Expand Down Expand Up @@ -756,22 +719,6 @@ bool CFE_UtAssert_GenericSignedCompare_Impl(int32 ActualValue, CFE_UtAssert_Comp
******************************************************************************/
#define CFE_UtAssert_SUCCESS(FN) CFE_UtAssert_SuccessCheck_Impl(FN, UTASSERT_CASETYPE_FAILURE, __FILE__, __LINE__, #FN)

/*****************************************************************************/
/**
** \brief Asserts the specific status code from the function being tested.
**
** \par Description
** The core of each unit test is the execution of the function being tested.
** This function and macro should be used to test for a specific status code
** from a function (typically an error case).
**
** \par Assumptions, External Events, and Notes:
** None
**
******************************************************************************/
#define CFE_UtAssert_EQUAL(FN, EXP) \
CFE_UtAssert_GenericSignedCompare_Impl(FN, CFE_UtAssert_Compare_EQ, EXP, __FILE__, __LINE__, "", #FN, #EXP)

/*****************************************************************************/
/**
** \brief Asserts the expression/function evaluates as logically true
Expand Down
22 changes: 11 additions & 11 deletions modules/fs/ut-coverage/fs_UT.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void Test_CFE_FS_API(void);
** \returns
** This function does not return a value.
**
** \sa #UT_Report, #CFE_FS_InitHeader
** \sa #CFE_FS_InitHeader
**
******************************************************************************/
void Test_CFE_FS_InitHeader(void);
Expand All @@ -95,7 +95,7 @@ void Test_CFE_FS_InitHeader(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_FS_ReadHeader,
** \sa #UT_InitData, #UT_SetOSFail, #CFE_FS_ReadHeader,
** \sa #UT_SetRtnCode
**
******************************************************************************/
Expand All @@ -114,7 +114,7 @@ void Test_CFE_FS_ReadHeader(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_FS_WriteHeader,
** \sa #UT_InitData, #UT_SetOSFail, #CFE_FS_WriteHeader,
** \sa #UT_SetRtnCode
**
******************************************************************************/
Expand Down Expand Up @@ -149,7 +149,7 @@ void Test_CFE_FS_DefaultFileStrings(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_FS_SetTimestamp,
** \sa #UT_InitData, #UT_SetOSFail, #CFE_FS_SetTimestamp,
** \sa #UT_SetRtnCode
**
******************************************************************************/
Expand All @@ -168,7 +168,7 @@ void Test_CFE_FS_SetTimestamp(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #CFE_FS_ByteSwapCFEHeader, #UT_Report
** \sa #UT_InitData, #CFE_FS_ByteSwapCFEHeader
**
******************************************************************************/
void Test_CFE_FS_ByteSwapCFEHeader(void);
Expand All @@ -186,7 +186,7 @@ void Test_CFE_FS_ByteSwapCFEHeader(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #CFE_FS_ByteSwapUint32, #UT_Report
** \sa #UT_InitData, #CFE_FS_ByteSwapUint32
**
******************************************************************************/
void Test_CFE_FS_ByteSwapUint32(void);
Expand All @@ -204,7 +204,7 @@ void Test_CFE_FS_ByteSwapUint32(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_Report, #CFE_FS_IsGzFile
** \sa #UT_InitData, #CFE_FS_IsGzFile
**
******************************************************************************/
void Test_CFE_FS_IsGzFile(void);
Expand All @@ -222,7 +222,7 @@ void Test_CFE_FS_IsGzFile(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_Report, #CFE_FS_ParseInputFileName
** \sa #UT_InitData, #CFE_FS_ParseInputFileName
**
******************************************************************************/
void Test_CFE_FS_ParseInputFileNameEx(void);
Expand All @@ -240,7 +240,7 @@ void Test_CFE_FS_ParseInputFileNameEx(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_Report, #CFE_FS_ExtractFilenameFromPath
** \sa #UT_InitData, #CFE_FS_ExtractFilenameFromPath
**
******************************************************************************/
void Test_CFE_FS_ExtractFileNameFromPath(void);
Expand All @@ -258,7 +258,7 @@ void Test_CFE_FS_ExtractFileNameFromPath(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_Report, #CFE_FS_EarlyInit,
** \sa #UT_InitData, #CFE_FS_EarlyInit,
** \sa #CFE_FS_LockSharedData, #UT_SetRtnCode, #CFE_FS_UnlockSharedData
**
******************************************************************************/
Expand All @@ -278,7 +278,7 @@ void Test_CFE_FS_Private(void);
** \returns
** This function does not return a value.
**
** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_FS_Decompress,
** \sa #UT_InitData, #UT_SetOSFail, #CFE_FS_Decompress,
** \sa #UT_SetReadBuffer, #FS_gz_inflate_fixed, #FS_gz_inflate_stored,
** \sa #FS_gz_fill_inbuf, #FS_gz_flush_window
**
Expand Down

0 comments on commit 90b9c39

Please sign in to comment.