From bc295bddd56040569ff33d2de450b8e83f68e3be Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Thu, 4 May 2017 14:54:38 +0200 Subject: [PATCH] tests: Properly define placeholders And include all needed headers, to catch misdefinitions. Signed-off-by: Quentin Glidic --- test/box-test.c | 5 ++++- test/mode-test.c | 8 +++++--- test/scrollbar-test.c | 5 ++++- test/textbox-test.c | 3 ++- test/theme-parser-test.c | 1 + test/widget-test.c | 4 +++- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/test/box-test.c b/test/box-test.c index a2840c49..4f009469 100644 --- a/test/box-test.c +++ b/test/box-test.c @@ -35,6 +35,9 @@ #include #include #include +#include "rofi.h" +#include "xrmoptions.h" +#include "helper.h" unsigned int test =0; #define TASSERT( a ) { \ assert ( a ); \ @@ -50,7 +53,7 @@ unsigned int test =0; } \ } -void config_parse_set_property ( G_GNUC_UNUSED const void *p ) +void config_parse_set_property ( G_GNUC_UNUSED const Property *p ) { } char * rofi_expand_path ( G_GNUC_UNUSED const char *path ) diff --git a/test/mode-test.c b/test/mode-test.c index b98062ad..25cf8934 100644 --- a/test/mode-test.c +++ b/test/mode-test.c @@ -37,6 +37,8 @@ #include #include #include +#include "rofi.h" +#include "x11-helper.h" #include #include @@ -45,7 +47,7 @@ void rofi_add_error_message ( G_GNUC_UNUSED GString *msg ) { } -int monitor_active ( G_GNUC_UNUSED void *d ) +int monitor_active ( G_GNUC_UNUSED workarea *d ) { return 0; } @@ -63,11 +65,11 @@ void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int { } -void * rofi_view_get_active ( void ) +RofiViewState * rofi_view_get_active ( void ) { return NULL; } -gboolean rofi_view_trigger_action ( G_GNUC_UNUSED void *state, G_GNUC_UNUSED KeyBindingAction action ) +gboolean rofi_view_trigger_action ( G_GNUC_UNUSED RofiViewState *state, G_GNUC_UNUSED KeyBindingAction action ) { return FALSE; } diff --git a/test/scrollbar-test.c b/test/scrollbar-test.c index b1b6e178..79796c53 100644 --- a/test/scrollbar-test.c +++ b/test/scrollbar-test.c @@ -35,6 +35,9 @@ #include #include #include +#include "rofi.h" +#include "xrmoptions.h" +#include "helper.h" unsigned int test =0; #define TASSERT( a ) { \ assert ( a ); \ @@ -54,7 +57,7 @@ char * helper_get_theme_path ( const char *file ) { return g_strdup ( file ); } -void config_parse_set_property ( G_GNUC_UNUSED const void *p ) +void config_parse_set_property ( G_GNUC_UNUSED const Property *p ) { } void rofi_add_error_message ( G_GNUC_UNUSED GString *msg ) diff --git a/test/textbox-test.c b/test/textbox-test.c index afba2943..93a45296 100644 --- a/test/textbox-test.c +++ b/test/textbox-test.c @@ -38,6 +38,7 @@ #include #include #include "settings.h" +#include "xrmoptions.h" static int test = 0; unsigned int normal_window_mode = 0; @@ -49,7 +50,7 @@ unsigned int normal_window_mode = 0; #include "view.h" -void config_parse_set_property ( G_GNUC_UNUSED void *p ) +void config_parse_set_property ( G_GNUC_UNUSED const Property *p ) { } diff --git a/test/theme-parser-test.c b/test/theme-parser-test.c index 90600774..19f1744b 100644 --- a/test/theme-parser-test.c +++ b/test/theme-parser-test.c @@ -37,6 +37,7 @@ #include "settings.h" #include "theme.h" #include "widgets/widget-internal.h" +#include "widgets/textbox.h" #include diff --git a/test/widget-test.c b/test/widget-test.c index ab9da425..dd4fb46e 100644 --- a/test/widget-test.c +++ b/test/widget-test.c @@ -34,12 +34,14 @@ #include #include #include +#include "rofi.h" +#include "xrmoptions.h" unsigned int test =0; #define TASSERT( a ) { \ assert ( a ); \ printf ( "Test %3i passed (%s)\n", ++test, # a ); \ } -void config_parse_set_property ( G_GNUC_UNUSED const void *p ) +void config_parse_set_property ( G_GNUC_UNUSED const Property *p ) { } void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )