As9f2abc75accidentally got the ordering of some of the includes wrong, I decided to propose my initial solution again. Additional to that, I've opened a MR against CMocka to solve this on their side, since I believe that the current way this is done is not sustainable [0]. [0] https://gitlab.com/cmocka/cmocka/-/merge_requests/91 Fixes:9f2abc75("Fix tests with gcc15 (uintptr_t)") Signed-off-by: Steffen Jaeckel <s@jaeckel.eu> CProof note: our new tests need to also be updated.
37 lines
740 B
C
37 lines
740 B
C
#include "prof_cmocka.h"
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <glib.h>
|
|
|
|
#include "config/preferences.h"
|
|
|
|
void
|
|
statuses_console_defaults_to_all(void** state)
|
|
{
|
|
gchar* setting = prefs_get_string(PREF_STATUSES_CONSOLE);
|
|
|
|
assert_non_null(setting);
|
|
assert_string_equal("all", setting);
|
|
g_free(setting);
|
|
}
|
|
|
|
void
|
|
statuses_chat_defaults_to_all(void** state)
|
|
{
|
|
gchar* setting = prefs_get_string(PREF_STATUSES_CHAT);
|
|
|
|
assert_non_null(setting);
|
|
assert_string_equal("none", setting);
|
|
g_free(setting);
|
|
}
|
|
|
|
void
|
|
statuses_muc_defaults_to_all(void** state)
|
|
{
|
|
gchar* setting = prefs_get_string(PREF_STATUSES_MUC);
|
|
|
|
assert_non_null(setting);
|
|
assert_string_equal("none", setting);
|
|
g_free(setting);
|
|
}
|