void test_url_check_scheme(void)
{
// enum UrlScheme url_check_scheme(const char *s);
+
+ {
+ TEST_CHECK(url_check_scheme(NULL) == 0);
+ }
}
void test_url_free(void)
{
// void url_free(struct Url **u);
+
+ {
+ url_free(NULL);
+ TEST_CHECK_(1, "url_free(NULL)");
+ }
+
+ {
+ struct Url *url = NULL;
+ url_free(&url);
+ TEST_CHECK_(1, "url_free(&url)");
+ }
}
void test_url_parse(void)
{
// struct Url *url_parse(const char *src);
+
+ {
+ TEST_CHECK(!url_parse(NULL));
+ }
}
void test_url_pct_decode(void)
{
// int url_pct_decode(char *s);
+
+ {
+ TEST_CHECK(url_pct_decode(NULL) != 0);
+ }
}
void test_url_pct_encode(void)
{
// void url_pct_encode(char *buf, size_t buflen, const char *src);
+
+ {
+ url_pct_encode(NULL, 10, "apple");
+ TEST_CHECK_(1, "url_pct_encode(NULL, 10, \"apple\")");
+ }
+
+ {
+ char buf[32] = { 0 };
+ url_pct_encode(buf, sizeof(buf), NULL);
+ TEST_CHECK_(1, "url_pct_encode(&buf, sizeof(buf), NULL)");
+ }
}
void test_url_tobuffer(void)
{
// int url_tobuffer(struct Url *u, struct Buffer *buf, int flags);
+
+ {
+ struct Buffer buf = { 0 };
+ TEST_CHECK(url_tobuffer(NULL, &buf, 0) != 0);
+ }
+
+ {
+ struct Url url = { 0 };
+ TEST_CHECK(url_tobuffer(&url, NULL, 0) != 0);
+ }
}
void test_url_tostring(void)
{
// int url_tostring(struct Url *u, char *dest, size_t len, int flags);
+
+ {
+ char buf[32] = { 0 };
+ TEST_CHECK(url_tostring(NULL, buf, sizeof(buf), 0) != 0);
+ }
+
+ {
+ struct Url url = { 0 };
+ TEST_CHECK(url_tostring(&url, NULL, 10, 0) != 0);
+ }
}