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
+11 -12
View File
@@ -29,8 +29,8 @@ static void test_Accumulator(void)
uint8_t apdu[MAX_APDU] = { 0 };
int len = 0;
int test_len = 0;
BACNET_READ_PROPERTY_DATA rpdata = {0};
BACNET_APPLICATION_DATA_VALUE value = {0};
BACNET_READ_PROPERTY_DATA rpdata = { 0 };
BACNET_APPLICATION_DATA_VALUE value = { 0 };
const int *required_property = NULL;
BACNET_UNSIGNED_INTEGER unsigned_value = 1;
@@ -48,14 +48,16 @@ static void test_Accumulator(void)
zassert_true(len >= 0, NULL);
if (len >= 0) {
if (IS_CONTEXT_SPECIFIC(rpdata.application_data[0])) {
test_len = bacapp_decode_context_data(rpdata.application_data,
len, &value, rpdata.object_property);
test_len = bacapp_decode_context_data(
rpdata.application_data, len, &value,
rpdata.object_property);
} else {
test_len = bacapp_decode_application_data(
rpdata.application_data, len, &value);
}
if (len != test_len) {
printf("property '%s': failed to decode!\n",
printf(
"property '%s': failed to decode!\n",
bactext_property_name(rpdata.object_property));
}
zassert_equal(len, test_len, NULL);
@@ -68,10 +70,10 @@ static void test_Accumulator(void)
Accumulator_Present_Value_Set(0, unsigned_value);
len = Accumulator_Read_Property(&rpdata);
zassert_not_equal(len, 0, NULL);
test_len = bacapp_decode_application_data(rpdata.application_data,
len, &value);
test_len = bacapp_decode_application_data(
rpdata.application_data, len, &value);
zassert_equal(len, test_len, NULL);
unsigned_value |= (unsigned_value<<1);
unsigned_value |= (unsigned_value << 1);
}
return;
@@ -80,15 +82,12 @@ static void test_Accumulator(void)
* @}
*/
#if defined(CONFIG_ZTEST_NEW_API)
ZTEST_SUITE(acc_tests, NULL, NULL, NULL, NULL, NULL);
#else
void test_main(void)
{
ztest_test_suite(acc_tests,
ztest_unit_test(test_Accumulator)
);
ztest_test_suite(acc_tests, ztest_unit_test(test_Accumulator));
ztest_run_test_suite(acc_tests);
}