debug_attr_list(&request->request_pairs, 0); \
vp = fr_dcursor_next(&cursor); \
TEST_CHECK_PAIR(vp, NULL); \
+ TEST_MSG("Cursor should've been empty (i.e. returned NULL) at end of test"); \
tmpl_dcursor_clear(&cc); \
TEST_CHECK_RET(talloc_free(request), 0)
pair_populate(1);
pair_populate(2);
tmpl_setup_and_cursor_init("&Test-Group-0[1].Test-Int16-0");
- TEST_CHECK(vp == child_vp2);
+ TEST_CHECK_PAIR(vp, child_vp2);
test_end;
}
TEST_CHECK_PAIR(vp, child_vp1);
vp = fr_dcursor_next(&cursor);
- TEST_CHECK(vp == child_vp2);
+ TEST_CHECK_PAIR(vp, child_vp2);
test_end;
}
pair_populate(1);
pair_populate(2);
tmpl_setup_and_cursor_init("&Test-Group-0[n].Test-Int16-0");
- TEST_CHECK(vp == child_vp2);
+ TEST_CHECK_PAIR(vp, child_vp2);
test_end;
}
pair_populate(1);
pair_populate(2);
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-Int32");
- TEST_CHECK(vp == leaf_int32_vp1);
+ TEST_CHECK_PAIR(vp, leaf_int32_vp1);
test_end;
}
pair_populate(1);
pair_populate(2);
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[*].Child-TLV[*].Leaf-Int32");
- TEST_CHECK(vp == leaf_int32_vp1);
+ TEST_CHECK_PAIR(vp, leaf_int32_vp1);
vp = fr_dcursor_next(&cursor);
- TEST_CHECK(vp == leaf_int32_vp2);
+ TEST_CHECK_PAIR(vp, leaf_int32_vp2);
test_end;
}
pair_populate(1);
pair_populate(2);
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[n].Child-TLV[n].Leaf-Int32[n]");
- TEST_CHECK(vp == leaf_int32_vp2);
+ TEST_CHECK_PAIR(vp, leaf_int32_vp2);
test_end;
}
pair_populate(1);
tmpl_setup_and_cursor_build_init("&Test-Int16-0");
- TEST_CHECK(inserted != NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Int16-0");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
test_end;
}
pair_populate(1);
tmpl_setup_and_cursor_build_init("&Test-Group-0.Test-Int32-0");
- TEST_CHECK(inserted != NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Group-0.Test-Int32-0");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
test_end;
}
fr_pair_t *inserted;
tmpl_setup_and_cursor_build_init("&Test-Group-0.Test-Int16-0");
- TEST_CHECK(inserted != NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Group-0.Test-Int16-0");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
test_end;
}
pair_populate_thin(1);
pair_populate_thin(2);
tmpl_setup_and_cursor_build_init("&Test-Group-0[*].Test-Int32-0");
- TEST_CHECK(inserted != NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
second = fr_dcursor_next(&cursor);
- TEST_CHECK(second != NULL);
- TEST_CHECK(second != inserted);
+ TEST_CHECK_PAIR_NEQ(second, NULL);
+ TEST_CHECK_PAIR(second, inserted);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Group-0[*].Test-Int32-0");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
vp = fr_dcursor_next(&cursor);
- TEST_CHECK(vp == second);
+ TEST_CHECK_PAIR(vp, second);
test_end;
}
pair_populate(1);
tmpl_setup_and_cursor_build_init("&Test-Group-0.Test-Group-0.Test-String-0");
- TEST_CHECK(inserted != NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Group-0.Test-Group-0.Test-String-0");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
test_end;
}
fr_pair_t *inserted;
tmpl_setup_and_cursor_build_init("&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
- TEST_CHECK(inserted != NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
test_end;
}
pair_populate(1);
pair_populate_thin(2);
tmpl_setup_and_cursor_build_init("&Test-Nested-Top-TLV-0[1].Child-TLV[0].Leaf-String");
- TEST_CHECK(inserted != NULL);
- TEST_CHECK(inserted != leaf_string_vp1);
+ TEST_CHECK_PAIR_NEQ(inserted, NULL);
+ TEST_CHECK_PAIR_NEQ(inserted, leaf_string_vp1);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[1].Child-TLV[0].Leaf-String");
- TEST_CHECK(vp == inserted);
+ TEST_CHECK_PAIR(vp, inserted);
test_end;
}
fr_pair_t *inserted;
tmpl_setup_and_cursor_build_init("&Test-Nested-Top-TLV-0[3].Child-TLV[0].Leaf-String");
- TEST_CHECK(inserted == NULL);
+ TEST_CHECK_PAIR(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[3].Child-TLV[0].Leaf-String");
fr_pair_t *inserted;
tmpl_setup_and_cursor_build_init("&Test-Nested-Top-TLV-0[*].Child-TLV[0].Leaf-String");
- TEST_CHECK(inserted == NULL);
+ TEST_CHECK_PAIR(inserted, NULL);
build_test_end;
tmpl_setup_and_cursor_init("&Test-Nested-Top-TLV-0[*].Child-TLV[0].Leaf-String");