Skip to content

Commit 978d0b5

Browse files
Formatting fixes
1 parent f1d7c3f commit 978d0b5

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

test/unit-test/downloader_cbor_utest.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#define CBOR_GETSTREAMREQUEST_ITEM_COUNT 6
2424

2525
/* ============================ TEST GLOBALS ============================= */
26-
const uint8_t * decodeMessageBuffer = (const uint8_t * ) "decodeMessageBuffer";
26+
const uint8_t * decodeMessageBuffer = ( const uint8_t * ) "decodeMessageBuffer";
2727
uint8_t * encodeMessageBuffer = ( uint8_t * ) "encodeMessageBuffer";
28-
const uint8_t * blockBitmap = (const uint8_t * ) "blockBitmap";
28+
const uint8_t * blockBitmap = ( const uint8_t * ) "blockBitmap";
2929
const char * clientToken = "clientToken";
3030
int32_t blockId = 1;
3131
int32_t blockSize = 2;
@@ -102,7 +102,7 @@ void cborFindsBlockIdKey( void )
102102

103103
void cborBlockIdKeyCorrectType( void )
104104
{
105-
cbor_value_get_type_ExpectAndReturn( &cborValue, (CborType) CborNoError );
105+
cbor_value_get_type_ExpectAndReturn( &cborValue, ( CborType ) CborNoError );
106106
cbor_value_get_int_ExpectAndReturn( &cborValue, &blockId, CborNoError );
107107
}
108108

@@ -115,7 +115,7 @@ void cborFindsBlockSizeKey( void )
115115

116116
void cborBlockSizeKeyCorrectType( void )
117117
{
118-
cbor_value_get_type_ExpectAndReturn( &cborValue, (CborType) CborNoError );
118+
cbor_value_get_type_ExpectAndReturn( &cborValue, ( CborType ) CborNoError );
119119
cbor_value_get_int_ExpectAndReturn( &cborValue, &blockSize, CborNoError );
120120
}
121121

@@ -323,7 +323,7 @@ void test_Decode_returnsFalse_cannotGetBlockIdValue( void )
323323
cborFindsFileIdKey();
324324
cborFileIdKeyCorrectType();
325325
cborFindsBlockIdKey();
326-
cbor_value_get_type_ExpectAndReturn( &cborValue, (CborType) CborNoError );
326+
cbor_value_get_type_ExpectAndReturn( &cborValue, ( CborType ) CborNoError );
327327
cbor_value_get_int_ExpectAndReturn( &cborValue, &blockId, CborUnknownError );
328328

329329
result = CBOR_Decode_GetStreamResponseMessage( decodeMessageBuffer, 1234U, &fileId, &blockId, &blockSize, payload, &payloadSize );
@@ -353,7 +353,7 @@ void test_Decode_returnsFalse_blockSizeWrongTypeInMap( void )
353353
cborFindsBlockIdKey();
354354
cborBlockIdKeyCorrectType();
355355
cborFindsBlockSizeKey();
356-
cbor_value_get_type_ExpectAndReturn( &cborValue, (CborType) CborUnknownError );
356+
cbor_value_get_type_ExpectAndReturn( &cborValue, ( CborType ) CborUnknownError );
357357

358358
result = CBOR_Decode_GetStreamResponseMessage( decodeMessageBuffer, 1234U, &fileId, &blockId, &blockSize, payload, &payloadSize );
359359
TEST_ASSERT_FALSE( result );
@@ -368,7 +368,7 @@ void test_Decode_returnsFalse_cannotGetBlockSizeValue( void )
368368
cborFindsBlockIdKey();
369369
cborBlockIdKeyCorrectType();
370370
cborFindsBlockSizeKey();
371-
cbor_value_get_type_ExpectAndReturn( &cborValue, (CborType) CborNoError );
371+
cbor_value_get_type_ExpectAndReturn( &cborValue, ( CborType ) CborNoError );
372372
cbor_value_get_int_ExpectAndReturn( &cborValue, &blockSize, CborUnknownError );
373373

374374
result = CBOR_Decode_GetStreamResponseMessage( decodeMessageBuffer, 1234U, &fileId, &blockId, &blockSize, payload, &payloadSize );
@@ -403,7 +403,7 @@ void test_Decode_returnsFalse_blockPayloadWrongTypeInMap( void )
403403
cborBlockSizeKeyCorrectType();
404404
cborFindsPayloadKeyInMap();
405405

406-
cbor_value_get_type_ExpectAndReturn( &cborValue, (CborType) CborUnknownError );
406+
cbor_value_get_type_ExpectAndReturn( &cborValue, ( CborType ) CborUnknownError );
407407

408408
result = CBOR_Decode_GetStreamResponseMessage( decodeMessageBuffer, 1234U, &fileId, &blockId, &blockSize, payload, &payloadSize );
409409
TEST_ASSERT_FALSE( result );

test/unit-test/downloader_utest.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ void test_processReceivedDataBlock_processesJSONBlock( void )
301301
uint8_t decodedData[ mqttFileDownloader_CONFIG_BLOCK_SIZE ];
302302
size_t dataLength = 0;
303303

304-
bool result = mqttDownloader_processReceivedDataBlock( &context, (uint8_t * ) "{\"p\": \"dGVzdA==\"}", strlen( "{\"p\": \"dGVzdA==\"}" ), decodedData, &dataLength );
304+
bool result = mqttDownloader_processReceivedDataBlock( &context, ( uint8_t * ) "{\"p\": \"dGVzdA==\"}", strlen( "{\"p\": \"dGVzdA==\"}" ), decodedData, &dataLength );
305305

306306
TEST_ASSERT_TRUE( result );
307307
TEST_ASSERT_EQUAL( 4, dataLength );
@@ -419,7 +419,6 @@ void test_processReceivedDataBlock_returnsFailureWhenDataIsNull( void )
419419

420420
context.dataType = DATA_TYPE_JSON;
421421

422-
uint8_t decodedData[ mqttFileDownloader_CONFIG_BLOCK_SIZE ];
423422
size_t dataLength = 0;
424423

425424
uintResult = mqttDownloader_processReceivedDataBlock( &context, ( uint8_t * ) "{\"p\": \"dGVzdA==\"}", strlen( "{\"p\": \"dGVzdA==\"}" ), NULL, &dataLength );

0 commit comments

Comments
 (0)