Added AlignAfterOpenBracket: AlwaysBreak and BinPackArguments: true to clang-format. Updated test/bacnet c/h files with updated format.

This commit is contained in:
Steve Karg
2024-04-24 09:38:12 -05:00
parent 1aaebe9414
commit 70c54817fd
120 changed files with 2182 additions and 1894 deletions
+12 -14
View File
@@ -44,7 +44,8 @@ static void set_address(unsigned index, BACNET_ADDRESS *dest)
}
}
static void set_file_address(const char *pFilename,
static void set_file_address(
const char *pFilename,
uint32_t device_id,
BACNET_ADDRESS *dest,
uint16_t max_apdu)
@@ -114,7 +115,6 @@ static void testAddressFile(void)
address_remove_device(device_id);
zassert_equal(address_count(), 0, NULL);
/* create a fake address */
device_id = 55555;
src.mac_len = 6;
@@ -170,12 +170,14 @@ static void testAddress(void)
set_address(i, &src);
/* test the lookup by device id */
zassert_true(
address_get_by_device(device_id, &test_max_apdu, &test_address), NULL);
address_get_by_device(device_id, &test_max_apdu, &test_address),
NULL);
zassert_equal(test_max_apdu, max_apdu, NULL);
zassert_true(bacnet_address_same(&test_address, &src), NULL);
zassert_true(
address_get_by_index(
i, &test_device_id, &test_max_apdu, &test_address), NULL);
i, &test_device_id, &test_max_apdu, &test_address),
NULL);
zassert_equal(test_device_id, device_id, NULL);
zassert_equal(test_max_apdu, max_apdu, NULL);
zassert_true(bacnet_address_same(&test_address, &src), NULL);
@@ -189,7 +191,8 @@ static void testAddress(void)
device_id = i * 255;
address_remove_device(device_id);
zassert_false(
address_get_by_device(device_id, &test_max_apdu, &test_address), NULL);
address_get_by_device(device_id, &test_max_apdu, &test_address),
NULL);
count = address_count();
zassert_equal(count, (MAX_ADDRESS_CACHE - i - 1), NULL);
}
@@ -198,26 +201,21 @@ static void testAddress(void)
* @}
*/
#if defined(CONFIG_ZTEST_NEW_API)
ZTEST_SUITE(address_tests, NULL, NULL, NULL, NULL, NULL);
#else
void test_main(void)
{
#ifdef BACNET_ADDRESS_CACHE_FILE
ztest_test_suite(address_tests,
ztest_unit_test(testAddressFile),
ztest_unit_test(testAddress)
);
ztest_test_suite(
address_tests, ztest_unit_test(testAddressFile),
ztest_unit_test(testAddress));
ztest_run_test_suite(address_tests);
#else
ztest_test_suite(address_tests,
ztest_unit_test(testAddress)
);
ztest_test_suite(address_tests, ztest_unit_test(testAddress));
ztest_run_test_suite(address_tests);
#endif
}
#endif