Commit fde2cda6 authored by Moritz Lipp's avatar Moritz Lipp

Fix test case macros

parent 889aff7a
......@@ -51,7 +51,7 @@ zathura_realpath(const char* path, char** real_path)
}
#ifdef WITH_MAGIC
HIDDEN char*
HIDDEN static char*
guess_type_magic(const char* path) {
if (path == NULL || strlen(path) == 0) {
return NULL;
......@@ -96,7 +96,7 @@ cleanup:
}
#endif
HIDDEN char*
HIDDEN static char*
guess_type_file(const char* path)
{
if (path == NULL || strlen(path) == 0) {
......@@ -130,7 +130,7 @@ guess_type_file(const char* path)
return out;
}
HIDDEN char*
HIDDEN static char*
guess_type_glib(const char* path)
{
if (path == NULL || strlen(path) == 0) {
......
......@@ -50,14 +50,14 @@ START_TEST(test_form_field_choice_set_type) {
} END_TEST
#define TEST_FORM_FIELD_CHOICE_BOOLEAN(test_set_function, set_function, test_get_function, get_function) \
START_TEST((test_set_function)) { \
START_TEST(test_set_function) { \
fail_unless((set_function)(NULL, true) == ZATHURA_ERROR_INVALID_ARGUMENTS); \
\
fail_unless((set_function)(form_field, true) == ZATHURA_ERROR_OK); \
fail_unless((set_function)(form_field, false) == ZATHURA_ERROR_OK); \
} END_TEST \
\
START_TEST((test_get_function)) { \
START_TEST(test_get_function) { \
bool value; \
\
fail_unless((get_function)(NULL, NULL) == ZATHURA_ERROR_INVALID_ARGUMENTS); \
......
......@@ -51,14 +51,14 @@ START_TEST(test_form_field_text_set_type) {
} END_TEST
#define TEST_FORM_FIELD_TEXT_BOOLEAN(test_set_function, set_function, test_get_function, get_function) \
START_TEST((test_set_function)) { \
START_TEST(test_set_function) { \
fail_unless((set_function)(NULL, true) == ZATHURA_ERROR_INVALID_ARGUMENTS); \
\
fail_unless((set_function)(form_field, true) == ZATHURA_ERROR_OK); \
fail_unless((set_function)(form_field, false) == ZATHURA_ERROR_OK); \
} END_TEST \
\
START_TEST((test_get_function)) { \
START_TEST(test_get_function) { \
bool value; \
\
fail_unless((get_function)(NULL, NULL) == ZATHURA_ERROR_INVALID_ARGUMENTS); \
......@@ -104,7 +104,7 @@ START_TEST(test_form_field_text_set_max_length) {
START_TEST(test_form_field_text_get_max_length) {
unsigned int max_length;
/* invalid arguments */
fail_unless(zathura_form_field_text_get_max_length(NULL, NULL) == ZATHURA_ERROR_INVALID_ARGUMENTS);
fail_unless(zathura_form_field_text_get_max_length(form_field, NULL) == ZATHURA_ERROR_INVALID_ARGUMENTS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment