mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 14:26:20 +00:00
Moved all tests to tests folder
This commit is contained in:
33
tests/unittests/test_preferences.c
Normal file
33
tests/unittests/test_preferences.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "config/preferences.h"
|
||||
|
||||
void statuses_console_defaults_to_all(void **state)
|
||||
{
|
||||
char *setting = prefs_get_string(PREF_STATUSES_CONSOLE);
|
||||
|
||||
assert_non_null(setting);
|
||||
assert_string_equal("all", setting);
|
||||
}
|
||||
|
||||
void statuses_chat_defaults_to_all(void **state)
|
||||
{
|
||||
char *setting = prefs_get_string(PREF_STATUSES_CHAT);
|
||||
|
||||
assert_non_null(setting);
|
||||
assert_string_equal("all", setting);
|
||||
}
|
||||
|
||||
void statuses_muc_defaults_to_all(void **state)
|
||||
{
|
||||
char *setting = prefs_get_string(PREF_STATUSES_MUC);
|
||||
|
||||
assert_non_null(setting);
|
||||
assert_string_equal("all", setting);
|
||||
}
|
||||
Reference in New Issue
Block a user