void test_mutt_buffer_add_printf(void)
{
// int mutt_buffer_add_printf(struct Buffer *buf, const char *fmt, ...);
+
+ {
+ TEST_CHECK(mutt_buffer_add_printf(NULL, "apple") != 0);
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ TEST_CHECK(mutt_buffer_add_printf(&buf, NULL) != 0);
+ }
}
void test_mutt_buffer_addch(void)
{
// size_t mutt_buffer_addch(struct Buffer *buf, char c);
+
+ {
+ TEST_CHECK(mutt_buffer_addch(NULL, 'a') == 0);
+ }
}
void test_mutt_buffer_addstr(void)
{
// size_t mutt_buffer_addstr(struct Buffer *buf, const char *s);
+
+ {
+ TEST_CHECK(mutt_buffer_addstr(NULL, "apple") == 0);
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ TEST_CHECK(mutt_buffer_addstr(&buf, NULL) == 0);
+ }
}
void test_mutt_buffer_addstr_n(void)
{
// size_t mutt_buffer_addstr_n(struct Buffer *buf, const char *s, size_t len);
+
+ {
+ TEST_CHECK(mutt_buffer_addstr_n(NULL, "apple", 10) == 0);
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ TEST_CHECK(mutt_buffer_addstr_n(&buf, NULL, 10) == 0);
+ }
}
void test_mutt_buffer_concat_path(void)
{
// void mutt_buffer_concat_path(struct Buffer *buf, const char *dir, const char *fname);
+
+ {
+ mutt_buffer_concat_path(NULL, "apple", "banana");
+ TEST_CHECK_(1, "mutt_buffer_concat_path(NULL, \"apple\", \"banana\")");
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ mutt_buffer_concat_path(&buf, NULL, "banana");
+ TEST_CHECK_(1, "mutt_buffer_concat_path(&buf, NULL, \"banana\")");
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ mutt_buffer_concat_path(&buf, "apple", NULL);
+ TEST_CHECK_(1, "mutt_buffer_concat_path(&buf, \"apple\", NULL)");
+ }
}
void test_mutt_buffer_fix_dptr(void)
{
// void mutt_buffer_fix_dptr(struct Buffer *buf);
+
+ {
+ mutt_buffer_fix_dptr(NULL);
+ TEST_CHECK_(1, "mutt_buffer_fix_dptr(NULL)");
+ }
}
void test_mutt_buffer_free(void)
{
// void mutt_buffer_free(struct Buffer **p);
+
+ {
+ mutt_buffer_free(NULL);
+ TEST_CHECK_(1, "mutt_buffer_free(NULL)");
+ }
+
+ {
+ struct Buffer *buf = NULL;
+ mutt_buffer_free(&buf);
+ TEST_CHECK_(1, "mutt_buffer_free(&buf)");
+ }
}
void test_mutt_buffer_from(void)
{
// struct Buffer *mutt_buffer_from(const char *seed);
+
+ {
+ TEST_CHECK(!mutt_buffer_from(NULL));
+ }
}
void test_mutt_buffer_increase_size(void)
{
// void mutt_buffer_increase_size(struct Buffer *buf, size_t new_size);
+
+ {
+ mutt_buffer_increase_size(NULL, 10);
+ TEST_CHECK_(1, "mutt_buffer_increase_size(NULL, 10)");
+ }
}
void test_mutt_buffer_init(void)
{
// struct Buffer *mutt_buffer_init(struct Buffer *buf);
+
+ {
+ TEST_CHECK(!mutt_buffer_init(NULL));
+ }
}
void test_mutt_buffer_is_empty(void)
{
// bool mutt_buffer_is_empty(const struct Buffer *buf);
+
+ {
+ TEST_CHECK(mutt_buffer_is_empty(NULL));
+ }
}
void test_mutt_buffer_len(void)
{
// size_t mutt_buffer_len(const struct Buffer *buf);
+
+ {
+ TEST_CHECK(mutt_buffer_len(NULL) == 0);
+ }
}
void test_mutt_buffer_pool_release(void)
{
// void mutt_buffer_pool_release(struct Buffer **pbuf);
+
+ {
+ mutt_buffer_pool_release(NULL);
+ TEST_CHECK_(1, "mutt_buffer_pool_release(NULL)");
+ }
+
+ {
+ struct Buffer *buf = NULL;
+ mutt_buffer_pool_release(&buf);
+ TEST_CHECK_(1, "mutt_buffer_pool_release(&buf)");
+ }
}
void test_mutt_buffer_printf(void)
{
// int mutt_buffer_printf(struct Buffer *buf, const char *fmt, ...);
+
+ {
+ TEST_CHECK(mutt_buffer_printf(NULL, "apple") != 0);
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ TEST_CHECK(mutt_buffer_printf(&buf, NULL) != 0);
+ }
}
void test_mutt_buffer_reset(void)
{
// void mutt_buffer_reset(struct Buffer *buf);
+
+ {
+ mutt_buffer_reset(NULL);
+ TEST_CHECK_(1, "mutt_buffer_reset(NULL)");
+ }
}
void test_mutt_buffer_strcpy(void)
{
// void mutt_buffer_strcpy(struct Buffer *buf, const char *s);
+
+ {
+ mutt_buffer_strcpy(NULL, "apple");
+ TEST_CHECK_(1, "mutt_buffer_strcpy(NULL, \"apple\")");
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ mutt_buffer_strcpy(&buf, NULL);
+ TEST_CHECK_(1, "mutt_buffer_strcpy(&buf, NULL)");
+ }
}
void test_mutt_buffer_strcpy_n(void)
{
// void mutt_buffer_strcpy_n(struct Buffer *buf, const char *s, size_t len);
+
+ {
+ mutt_buffer_strcpy_n(NULL, "apple", 3);
+ TEST_CHECK_(1, "mutt_buffer_strcpy_n(NULL, \"apple\", 3)");
+ }
+
+ {
+ struct Buffer buf = { 0 };
+ mutt_buffer_strcpy_n(&buf, NULL, 3);
+ TEST_CHECK_(1, "mutt_buffer_strcpy_n(&buf, NULL, 3)");
+ }
}