]> git.proxmox.com Git - mirror_frr.git/blobdiff - pceplib/test/pcep_utils_ordered_list_test.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / pceplib / test / pcep_utils_ordered_list_test.c
index d20f5e68afde269ee44805cb544989daa3257808..8b236cc6de1419ea0d607ca62944b86cc70fb07e 100644 (file)
@@ -1,21 +1,9 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
 /*
  * This file is part of the PCEPlib, a PCEP protocol library.
  *
  * Copyright (C) 2020 Volta Networks https://voltanet.io/
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- *
  * Author : Brady Johnson <brady@voltanet.io>
  *
  */
@@ -25,6 +13,7 @@
 #include "config.h"
 #endif
 
+#include <assert.h>
 #include <CUnit/CUnit.h>
 
 #include "pcep_utils_ordered_list.h"
@@ -55,6 +44,7 @@ void test_empty_list()
                ordered_list_initialize(node_data_compare);
 
        CU_ASSERT_PTR_NOT_NULL(handle);
+       assert(handle != NULL);
        CU_ASSERT_PTR_NULL(handle->head);
        CU_ASSERT_PTR_NOT_NULL(handle->compare_function);
        CU_ASSERT_EQUAL(handle->num_entries, 0);
@@ -134,14 +124,17 @@ void test_find()
 
        ordered_list_node *node = ordered_list_find(handle, &data1);
        CU_ASSERT_PTR_NOT_NULL(node);
+       assert(node != NULL);
        CU_ASSERT_PTR_EQUAL(node->data, &data1);
 
        node = ordered_list_find(handle, &data2);
        CU_ASSERT_PTR_NOT_NULL(node);
+       assert(node != NULL);
        CU_ASSERT_PTR_EQUAL(node->data, &data2);
 
        node = ordered_list_find(handle, &data3);
        CU_ASSERT_PTR_NOT_NULL(node);
+       assert(node != NULL);
        CU_ASSERT_PTR_EQUAL(node->data, &data3);
 
        node = ordered_list_find(handle, &data_not_inList);