Added AlignAfterOpenBracket: AlwaysBreak and BinPackArguments: true to clang-format. Updated test/bacnet c/h files with updated format.
This commit is contained in:
@@ -71,8 +71,7 @@ void testBACnetObjects(Test *pTest)
|
||||
for (test_point = 0; test_point < max_test_points; test_point++) {
|
||||
device_id = test_point * (BACNET_MAX_INSTANCE / max_test_points);
|
||||
pDevice = objects_device_data(test_point);
|
||||
testBACnetObjectsCompare(
|
||||
pTest, pDevice, objects_device_id(test_point));
|
||||
testBACnetObjectsCompare(pTest, pDevice, objects_device_id(test_point));
|
||||
}
|
||||
for (test_point = 0; test_point < max_test_points; test_point++) {
|
||||
status = objects_device_delete(0);
|
||||
@@ -99,4 +98,3 @@ int main(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
/**
|
||||
* @brief Test
|
||||
*/
|
||||
static void testBACnetObjectsCompare(
|
||||
OBJECT_DEVICE_T *pDevice, uint32_t expected_device_id)
|
||||
static void
|
||||
testBACnetObjectsCompare(OBJECT_DEVICE_T *pDevice, uint32_t expected_device_id)
|
||||
{
|
||||
zassert_not_null(pDevice, NULL);
|
||||
if (pDevice) {
|
||||
zassert_not_null(pDevice->Object_List, NULL);
|
||||
zassert_equal(pDevice->Object_Identifier.instance, expected_device_id, NULL);
|
||||
zassert_equal(
|
||||
pDevice->Object_Identifier.instance, expected_device_id, NULL);
|
||||
zassert_equal(pDevice->Object_Identifier.type, OBJECT_DEVICE, NULL);
|
||||
zassert_equal(pDevice->Object_Type, OBJECT_DEVICE, NULL);
|
||||
}
|
||||
@@ -43,7 +44,6 @@ static void testBACnetObjects(void)
|
||||
const unsigned max_test_points = 20;
|
||||
OBJECT_DEVICE_T *pDevice;
|
||||
|
||||
|
||||
/* Verify deleting a non-existant object returns the correct value */
|
||||
zassert_false(objects_device_delete(0), NULL);
|
||||
|
||||
@@ -53,7 +53,7 @@ static void testBACnetObjects(void)
|
||||
pDevice = objects_device_new(device_id);
|
||||
testBACnetObjectsCompare(pDevice, device_id);
|
||||
|
||||
/* Verify the last created device can be fetched by ID */
|
||||
/* Verify the last created device can be fetched by ID */
|
||||
pDevice = objects_device_by_instance(device_id);
|
||||
testBACnetObjectsCompare(pDevice, device_id);
|
||||
}
|
||||
@@ -83,15 +83,12 @@ static void testBACnetObjects(void)
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
#if defined(CONFIG_ZTEST_NEW_API)
|
||||
ZTEST_SUITE(objects_tests, NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(objects_tests,
|
||||
ztest_unit_test(testBACnetObjects)
|
||||
);
|
||||
ztest_test_suite(objects_tests, ztest_unit_test(testBACnetObjects));
|
||||
|
||||
ztest_run_test_suite(objects_tests);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user