cleanup: Map test files according to structure in src
For example cmd_account() is located in src/command/cmd_funcs.c. The unit test was located in tests/unittests/test_cmd_account.c. Let's move it to a subdirectory like tests/unittests/command/test_cmd_account.c to correpsond to the same structure.
This commit is contained in:
36
tests/unittests/config/test_preferences.c
Normal file
36
tests/unittests/config/test_preferences.c
Normal file
@@ -0,0 +1,36 @@
|
||||
#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);
|
||||
}
|
||||
3
tests/unittests/config/test_preferences.h
Normal file
3
tests/unittests/config/test_preferences.h
Normal file
@@ -0,0 +1,3 @@
|
||||
void statuses_console_defaults_to_all(void** state);
|
||||
void statuses_chat_defaults_to_all(void** state);
|
||||
void statuses_muc_defaults_to_all(void** state);
|
||||
Reference in New Issue
Block a user