@@ -301,16 +301,15 @@ void Test_HK_ProcessIncomingHkData_MessageError(void)
301
301
void Test_HK_ValidateHkCopyTable_Success (void )
302
302
{
303
303
/* Arrange */
304
- hk_copy_table_entry_t CopyTblPtr [HK_COPY_TABLE_ENTRIES ];
304
+ hk_copy_table_entry_t CopyTblPtr [HK_COPY_TABLE_ENTRIES ];
305
305
306
306
HK_Test_InitGoodCopyTable (CopyTblPtr );
307
307
308
308
/* Act */
309
309
int32 ReturnValue = HK_ValidateHkCopyTable (CopyTblPtr );
310
310
311
311
/* Assert */
312
- UtAssert_True (ReturnValue == HK_SUCCESS , "HK_ValidateHkCopyTable returned %d, expected %d (HK_SUCCESS)" ,
313
- ReturnValue , HK_SUCCESS );
312
+ UtAssert_INT32_EQ (ReturnValue , HK_SUCCESS );
314
313
}
315
314
316
315
/*
@@ -322,16 +321,15 @@ void Test_HK_ValidateHkCopyTable_Success(void)
322
321
void Test_HK_ValidateHkCopyTable_Error (void )
323
322
{
324
323
/* Arrange */
325
- hk_copy_table_entry_t CopyTblPtr [HK_COPY_TABLE_ENTRIES ];
324
+ hk_copy_table_entry_t CopyTblPtr [HK_COPY_TABLE_ENTRIES ];
326
325
327
326
HK_Test_InitOverflowCopyTable (CopyTblPtr );
328
327
329
328
/* Act */
330
329
int32 ReturnValue = HK_ValidateHkCopyTable (CopyTblPtr );
331
330
332
331
/* Assert */
333
- UtAssert_True (ReturnValue == HK_ERROR , "HK_ValidateHkCopyTable returned %d, expected %d (HK_ERROR)" ,
334
- ReturnValue , HK_ERROR );
332
+ UtAssert_INT32_EQ (ReturnValue , HK_ERROR );
335
333
}
336
334
337
335
/**********************************************************************/
@@ -422,7 +420,7 @@ void Test_HK_ProcessNewCopyTable_PoolBufFail(void)
422
420
CFE_Status_t ReturnValue ;
423
421
int32 i ;
424
422
int32 ExtraSubscribes = 0 ;
425
- int32 strCmpResult ;
423
+ int strCmpResult ;
426
424
427
425
char ExpectedEventString [CFE_MISSION_EVS_MAX_MESSAGE_LENGTH ];
428
426
@@ -457,7 +455,7 @@ void Test_HK_ProcessNewCopyTable_PoolBufFail(void)
457
455
strCmpResult =
458
456
strncmp (ExpectedEventString , context_CFE_EVS_SendEvent [i ].Spec , CFE_MISSION_EVS_MAX_MESSAGE_LENGTH );
459
457
460
- UtAssert_True (strCmpResult == 0 , "Event #%d string matched expected result, '%s'" , i ,
458
+ UtAssert_True (strCmpResult == 0 , "Event #%d string matched expected result, '%s'" , ( int ) i ,
461
459
context_CFE_EVS_SendEvent [i ].Spec );
462
460
}
463
461
@@ -486,7 +484,7 @@ void Test_HK_ProcessNewCopyTable_SubscribeFail(void)
486
484
{
487
485
/* Arrange */
488
486
CFE_Status_t ReturnValue ;
489
- int32 strCmpResult ;
487
+ int strCmpResult ;
490
488
int32 i ;
491
489
int32 SubscriptionCount = 0 ;
492
490
@@ -522,7 +520,7 @@ void Test_HK_ProcessNewCopyTable_SubscribeFail(void)
522
520
strCmpResult =
523
521
strncmp (ExpectedEventString , context_CFE_EVS_SendEvent [i ].Spec , CFE_MISSION_EVS_MAX_MESSAGE_LENGTH );
524
522
525
- UtAssert_True (strCmpResult == 0 , "Event #%d string matched expected result, '%s'" , i ,
523
+ UtAssert_True (strCmpResult == 0 , "Event #%d string matched expected result, '%s'" , ( int ) i ,
526
524
context_CFE_EVS_SendEvent [i ].Spec );
527
525
}
528
526
@@ -867,7 +865,7 @@ void Test_HK_TearDownOldCopyTable_PoolFreeFail(void)
867
865
/* Arrange */
868
866
CFE_Status_t ReturnValue ;
869
867
int32 i ;
870
- int32 strCmpResult ;
868
+ int strCmpResult ;
871
869
872
870
char ExpectedEventString [CFE_MISSION_EVS_MAX_MESSAGE_LENGTH ];
873
871
@@ -901,7 +899,7 @@ void Test_HK_TearDownOldCopyTable_PoolFreeFail(void)
901
899
strCmpResult =
902
900
strncmp (ExpectedEventString , context_CFE_EVS_SendEvent [i ].Spec , CFE_MISSION_EVS_MAX_MESSAGE_LENGTH );
903
901
904
- UtAssert_True (strCmpResult == 0 , "Event #%d string matched expected result, '%s'" , i ,
902
+ UtAssert_True (strCmpResult == 0 , "Event #%d string matched expected result, '%s'" , ( int ) i ,
905
903
context_CFE_EVS_SendEvent [i ].Spec );
906
904
}
907
905
}
@@ -938,7 +936,7 @@ void Test_HK_TearDownOldCopyTable_Success(void)
938
936
939
937
for (i = 0 ; i < 5 ; i ++ )
940
938
{
941
- UtAssert_True (RtTblPtr [i ].OutputPktAddr == NULL , "RtTblPtr[%d].OutputPktAddr == NULL" , i );
939
+ UtAssert_True (RtTblPtr [i ].OutputPktAddr == NULL , "RtTblPtr[%d].OutputPktAddr == NULL" , ( int ) i );
942
940
UtAssert_INT32_EQ (RtTblPtr [i ].InputMidSubscribed , HK_INPUTMID_NOT_SUBSCRIBED );
943
941
}
944
942
}
@@ -1019,7 +1017,7 @@ void Test_HK_TearDownOldCopyTable_Success2(void)
1019
1017
1020
1018
for (i = 0 ; i < 5 ; i ++ )
1021
1019
{
1022
- UtAssert_True (RtTblPtr [i ].OutputPktAddr == NULL , "RtTblPtr[%d].OutputPktAddr == NULL" , i );
1020
+ UtAssert_True (RtTblPtr [i ].OutputPktAddr == NULL , "RtTblPtr[%d].OutputPktAddr == NULL" , ( int ) i );
1023
1021
UtAssert_INT32_EQ (RtTblPtr [i ].InputMidSubscribed , HK_INPUTMID_NOT_SUBSCRIBED );
1024
1022
}
1025
1023
}
@@ -1955,8 +1953,7 @@ void UtTest_Setup(void)
1955
1953
/* Test functions for HK_VaidateHkCopyTable */
1956
1954
UtTest_Add (Test_HK_ValidateHkCopyTable_Success , HK_Test_Setup , HK_Test_TearDown ,
1957
1955
"Test_HK_ValidateHkCopyTable_Success" );
1958
- UtTest_Add (Test_HK_ValidateHkCopyTable_Error , HK_Test_Setup , HK_Test_TearDown ,
1959
- "Test_HK_ValidateHkCopyTable_Error" );
1956
+ UtTest_Add (Test_HK_ValidateHkCopyTable_Error , HK_Test_Setup , HK_Test_TearDown , "Test_HK_ValidateHkCopyTable_Error" );
1960
1957
1961
1958
/* Test functions for HK_ProcessNewCopyTable */
1962
1959
UtTest_Add (Test_HK_ProcessNewCopyTable_EmptyTable , HK_Test_Setup , HK_Test_TearDown ,
0 commit comments