mirror of https://github.com/getdnsapi/getdns.git
Adjust all context = NULL tests to expect GETDNS_RETURN_INVALID_PARAMETER
This commit is contained in:
parent
4fceebbdcf
commit
d3ca61ef58
|
@ -13,14 +13,14 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
struct getdns_context *context = NULL;
|
||||
getdns_transaction_t transaction_id = 0;
|
||||
|
||||
ASSERT_RC(getdns_address(context, "google.com", NULL,
|
||||
NULL, &transaction_id, callbackfn),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_address()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_address()");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
struct getdns_context *context = NULL;
|
||||
struct getdns_dict *response = NULL;
|
||||
|
||||
ASSERT_RC(getdns_address_sync(context, "google.com", NULL, &response),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_address_sync()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_address_sync()");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
getdns_transaction_t transaction_id = 0;
|
||||
|
||||
ASSERT_RC(getdns_cancel_callback(NULL, transaction_id),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_cancel_callback()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_cancel_callback()");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
struct getdns_context *context = NULL;
|
||||
|
||||
ASSERT_RC(getdns_context_set_context_update_callback(context, update_callbackfn),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_context_set_context_update_callback()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_context_set_context_update_callback()");
|
||||
|
||||
}
|
||||
END_TEST
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
struct getdns_context *context = NULL;
|
||||
getdns_transaction_t transaction_id = 0;
|
||||
|
||||
ASSERT_RC(getdns_general(context, "google.com", GETDNS_RRTYPE_A, NULL,
|
||||
NULL, &transaction_id, callbackfn),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_general()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_general()");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
struct getdns_context *context = NULL;
|
||||
struct getdns_dict *response = NULL;
|
||||
|
||||
ASSERT_RC(getdns_general_sync(context, "google.com", GETDNS_RRTYPE_A, NULL, &response),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_general_sync()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_general_sync()");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
struct getdns_context *context = NULL;
|
||||
struct getdns_dict *address = NULL;
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
ASSERT_RC(getdns_hostname(context, address, NULL,
|
||||
NULL, &transaction_id, callbackfn),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_hostname()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_hostname()");
|
||||
|
||||
DICT_DESTROY(address);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{
|
||||
/*
|
||||
* context = NULL
|
||||
* expect: GETDNS_RETURN_BAD_CONTEXT
|
||||
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||
*/
|
||||
struct getdns_context *context = NULL;
|
||||
struct getdns_dict *address = NULL;
|
||||
|
@ -28,7 +28,7 @@
|
|||
GETDNS_RETURN_GOOD, "Return code from getdns_dict_set_bindata()");
|
||||
|
||||
ASSERT_RC(getdns_hostname_sync(context, address, NULL, &response),
|
||||
GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_hostname_sync()");
|
||||
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_hostname_sync()");
|
||||
|
||||
DICT_DESTROY(address);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue