tests: Properly define placeholders

And include all needed headers, to catch misdefinitions.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2017-05-04 14:54:38 +02:00
parent cdc352edf9
commit bc295bddd5
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
6 changed files with 19 additions and 7 deletions

View File

@ -35,6 +35,9 @@
#include <widgets/box.h> #include <widgets/box.h>
#include <widgets/widget.h> #include <widgets/widget.h>
#include <widgets/widget-internal.h> #include <widgets/widget-internal.h>
#include "rofi.h"
#include "xrmoptions.h"
#include "helper.h"
unsigned int test =0; unsigned int test =0;
#define TASSERT( a ) { \ #define TASSERT( a ) { \
assert ( 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 ) char * rofi_expand_path ( G_GNUC_UNUSED const char *path )

View File

@ -37,6 +37,8 @@
#include <mode-private.h> #include <mode-private.h>
#include <dialogs/help-keys.h> #include <dialogs/help-keys.h>
#include <xkbcommon/xkbcommon.h> #include <xkbcommon/xkbcommon.h>
#include "rofi.h"
#include "x11-helper.h"
#include <keyb.h> #include <keyb.h>
#include <helper.h> #include <helper.h>
@ -45,7 +47,7 @@
void rofi_add_error_message ( G_GNUC_UNUSED GString *msg ) 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; 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; 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; return FALSE;
} }

View File

@ -35,6 +35,9 @@
#include <widgets/scrollbar.h> #include <widgets/scrollbar.h>
#include <widgets/widget.h> #include <widgets/widget.h>
#include <widgets/widget-internal.h> #include <widgets/widget-internal.h>
#include "rofi.h"
#include "xrmoptions.h"
#include "helper.h"
unsigned int test =0; unsigned int test =0;
#define TASSERT( a ) { \ #define TASSERT( a ) { \
assert ( a ); \ assert ( a ); \
@ -54,7 +57,7 @@ char * helper_get_theme_path ( const char *file )
{ {
return g_strdup ( 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 ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )

View File

@ -38,6 +38,7 @@
#include <rofi.h> #include <rofi.h>
#include <cairo-xlib.h> #include <cairo-xlib.h>
#include "settings.h" #include "settings.h"
#include "xrmoptions.h"
static int test = 0; static int test = 0;
unsigned int normal_window_mode = 0; unsigned int normal_window_mode = 0;
@ -49,7 +50,7 @@ unsigned int normal_window_mode = 0;
#include "view.h" #include "view.h"
void config_parse_set_property ( G_GNUC_UNUSED void *p ) void config_parse_set_property ( G_GNUC_UNUSED const Property *p )
{ {
} }

View File

@ -37,6 +37,7 @@
#include "settings.h" #include "settings.h"
#include "theme.h" #include "theme.h"
#include "widgets/widget-internal.h" #include "widgets/widget-internal.h"
#include "widgets/textbox.h"
#include <check.h> #include <check.h>

View File

@ -34,12 +34,14 @@
#include <string.h> #include <string.h>
#include <widgets/widget.h> #include <widgets/widget.h>
#include <widgets/widget-internal.h> #include <widgets/widget-internal.h>
#include "rofi.h"
#include "xrmoptions.h"
unsigned int test =0; unsigned int test =0;
#define TASSERT( a ) { \ #define TASSERT( a ) { \
assert ( a ); \ assert ( a ); \
printf ( "Test %3i passed (%s)\n", ++test, # 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 ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )