]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more checks
authorAlan T. DeKok <aland@freeradius.org>
Sun, 16 Jul 2023 01:55:35 +0000 (21:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 16 Jul 2023 01:55:35 +0000 (21:55 -0400)
seems like a heisenbug?

src/lib/util/pair_tests.c

index 45c5729bb5f5226952455909b5bfa72754518f74..9822a2e8ffe4dd4229322d4a163dbd988488a74f 100644 (file)
@@ -706,14 +706,17 @@ static void test_fr_pair_list_copy_by_ancestor(void)
        TEST_CASE("Copy 'test_pairs' into 'local_pairs'");
        TEST_CHECK(fr_pair_list_copy_by_ancestor(autofree, &local_pairs, &test_pairs, fr_dict_attr_test_tlv) > 0);
 
+       TEST_CASE("The 'local_pairs' should have only one attribute in it");
+       TEST_CHECK(fr_pair_list_num_elements(&local_pairs) == 1);
+
        TEST_CASE("The 'local_pairs' should have only fr_dict_attr_test_tlv_string (ancestor of 'Test-TLV-Root'");
        vp = fr_pair_list_head(&local_pairs);
 
-       TEST_CASE("Validating we copied attribute");
+       TEST_CASE("Validating we copied the attribute");
        TEST_CHECK(vp != NULL);
        if (!vp) return;
 
-       TEST_CASE("Expected copied attribure == fr_dict_attr_test_tlv_string)");
+       TEST_CASE("Expected copied attribute == fr_dict_attr_test_tlv_string)");
        TEST_CHECK(vp->da == fr_dict_attr_test_tlv_string);
 
        TEST_CASE("Verifying the copied attribute");