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
+19 -29
View File
@@ -17,13 +17,10 @@
*/
/**
* Unit Test for the days, checking the epoch conversion
*/
* Unit Test for the days, checking the epoch conversion
*/
static void test_epoch_conversion_date(
uint16_t epoch_year,
uint16_t year,
uint8_t month,
uint8_t day)
uint16_t epoch_year, uint16_t year, uint8_t month, uint8_t day)
{
uint32_t days;
uint16_t test_year;
@@ -32,8 +29,8 @@ static void test_epoch_conversion_date(
/* conversions of day and date */
days = days_since_epoch(epoch_year, year, month, day);
days_since_epoch_to_date(epoch_year, days, &test_year, &test_month,
&test_day);
days_since_epoch_to_date(
epoch_year, days, &test_year, &test_month, &test_day);
zassert_equal(year, test_year, NULL);
zassert_equal(month, test_month, NULL);
zassert_equal(day, test_day, NULL);
@@ -61,15 +58,12 @@ static void test_days_epoch_conversion(void)
* Unit Test for the days and year to month date year
*/
static void test_days_of_year_to_month_day_date(
uint16_t year,
uint16_t days,
uint8_t month,
uint8_t day)
uint16_t year, uint16_t days, uint8_t month, uint8_t day)
{
uint8_t test_month = 0;
uint8_t test_day = 0;
/* conversions of days and year */
days_of_year_to_month_day(days , year, &test_month, &test_day);
days_of_year_to_month_day(days, year, &test_month, &test_day);
zassert_equal(month, test_month, NULL);
zassert_equal(day, test_day, NULL);
}
@@ -91,11 +85,9 @@ static void test_days_of_year_to_md(void)
}
/**
* Unit Test for the days, checking the date to see if it is a valid day
*/
static void test_date_is_valid_day(
uint16_t year,
uint8_t month)
* Unit Test for the days, checking the date to see if it is a valid day
*/
static void test_date_is_valid_day(uint16_t year, uint8_t month)
{
uint8_t last_day = days_per_month(year, month);
@@ -107,8 +99,8 @@ static void test_date_is_valid_day(
}
/**
* Unit Test for the days, checking the date to see if it is a valid date
*/
* Unit Test for the days, checking the date to see if it is a valid date
*/
#if defined(CONFIG_ZTEST_NEW_API)
ZTEST(days_tests, test_days_date_is_valid)
#else
@@ -143,8 +135,8 @@ static void test_days_date_is_valid(void)
}
/**
* Unit Test for days apart, checking the dates to see how many days apart
*/
* Unit Test for days apart, checking the dates to see how many days apart
*/
#if defined(CONFIG_ZTEST_NEW_API)
ZTEST(days_tests, test_days_apart)
#else
@@ -163,18 +155,16 @@ static void test_days_apart(void)
* @}
*/
#if defined(CONFIG_ZTEST_NEW_API)
ZTEST_SUITE(days_tests, NULL, NULL, NULL, NULL, NULL);
#else
void test_main(void)
{
ztest_test_suite(days_tests,
ztest_unit_test(test_days_epoch_conversion),
ztest_unit_test(test_days_of_year_to_md),
ztest_unit_test(test_days_date_is_valid),
ztest_unit_test(test_days_apart)
);
ztest_test_suite(
days_tests, ztest_unit_test(test_days_epoch_conversion),
ztest_unit_test(test_days_of_year_to_md),
ztest_unit_test(test_days_date_is_valid),
ztest_unit_test(test_days_apart));
ztest_run_test_suite(days_tests);
}