diff options
24 files changed, 2064 insertions, 35 deletions
diff --git a/doc/en/weechat_dev.en.adoc b/doc/en/weechat_dev.en.adoc index a2161826b..237a7f37e 100644 --- a/doc/en/weechat_dev.en.adoc +++ b/doc/en/weechat_dev.en.adoc @@ -437,7 +437,24 @@ WeeChat "core" is located in following directories: | test-core-sys.cpp | Tests: system functions. | hook/ | Root of unit tests for hooks. | test-hook-command.cpp | Tests: hooks "command". +| test-hook-command-run.cpp | Tests: hooks "command_run". +| test-hook-completion.cpp | Tests: hooks "completion". +| test-hook-config.cpp | Tests: hooks "config". +| test-hook-connect.cpp | Tests: hooks "connect". +| test-hook-fd.cpp | Tests: hooks "fd". +| test-hook-focus.cpp | Tests: hooks "focus". +| test-hook-hdata.cpp | Tests: hooks "hdata". +| test-hook-hsignal.cpp | Tests: hooks "hsignal". +| test-hook-info-hashtable.cpp | Tests: hooks "info_hashtable". +| test-hook-info.cpp | Tests: hooks "info". +| test-hook-infolist.cpp | Tests: hooks "infolist". +| test-hook-line.cpp | Tests: hooks "line". | test-hook-modifier.cpp | Tests: hooks "modifier". +| test-hook-print.cpp | Tests: hooks "print". +| test-hook-process.cpp | Tests: hooks "process". +| test-hook-signal.cpp | Tests: hooks "signal". +| test-hook-timer.cpp | Tests: hooks "timer". +| test-hook-url.cpp | Tests: hooks "url". | gui/ | Root of unit tests for interfaces. | test-gui-bar-window.cpp | Tests: bar window functions. | test-gui-buffer.cpp | Tests: buffer functions. diff --git a/doc/fr/weechat_dev.fr.adoc b/doc/fr/weechat_dev.fr.adoc index 422d4eab3..e768fc74e 100644 --- a/doc/fr/weechat_dev.fr.adoc +++ b/doc/fr/weechat_dev.fr.adoc @@ -439,7 +439,24 @@ Le cœur de WeeChat est situé dans les répertoires suivants : | test-core-sys.cpp | Tests : fonctions système. | hook/ | Racine des tests pour les hooks. | test-hook-command.cpp | Tests : hooks "command". +| test-hook-command-run.cpp | Tests: hooks "command_run". +| test-hook-completion.cpp | Tests: hooks "completion". +| test-hook-config.cpp | Tests: hooks "config". +| test-hook-connect.cpp | Tests: hooks "connect". +| test-hook-fd.cpp | Tests: hooks "fd". +| test-hook-focus.cpp | Tests: hooks "focus". +| test-hook-hdata.cpp | Tests: hooks "hdata". +| test-hook-hsignal.cpp | Tests: hooks "hsignal". +| test-hook-info-hashtable.cpp | Tests: hooks "info_hashtable". +| test-hook-info.cpp | Tests: hooks "info". +| test-hook-infolist.cpp | Tests: hooks "infolist". +| test-hook-line.cpp | Tests: hooks "line". | test-hook-modifier.cpp | Tests : hooks "modifier". +| test-hook-print.cpp | Tests: hooks "print". +| test-hook-process.cpp | Tests: hooks "process". +| test-hook-signal.cpp | Tests: hooks "signal". +| test-hook-timer.cpp | Tests: hooks "timer". +| test-hook-url.cpp | Tests: hooks "url". | gui/ | Racine des tests unitaires pour les interfaces. | test-gui-bar-window.cpp | Tests : fonctions de fenêtres de barre. | test-gui-buffer.cpp | Tests : fonctions de tampons. diff --git a/doc/ja/weechat_dev.ja.adoc b/doc/ja/weechat_dev.ja.adoc index 8736ede6f..607ee1cb9 100644 --- a/doc/ja/weechat_dev.ja.adoc +++ b/doc/ja/weechat_dev.ja.adoc @@ -488,7 +488,42 @@ WeeChat "core" は以下のディレクトリに配置されています: // TRANSLATION MISSING | test-hook-command.cpp | Tests: hooks "command". // TRANSLATION MISSING +| test-hook-command-run.cpp | Tests: hooks "command_run". +// TRANSLATION MISSING +| test-hook-completion.cpp | Tests: hooks "completion". +// TRANSLATION MISSING +| test-hook-config.cpp | Tests: hooks "config". +// TRANSLATION MISSING +| test-hook-connect.cpp | Tests: hooks "connect". +// TRANSLATION MISSING +| test-hook-fd.cpp | Tests: hooks "fd". +// TRANSLATION MISSING +| test-hook-focus.cpp | Tests: hooks "focus". +// TRANSLATION MISSING +| test-hook-hdata.cpp | Tests: hooks "hdata". +// TRANSLATION MISSING +| test-hook-hsignal.cpp | Tests: hooks "hsignal". +// TRANSLATION MISSING +| test-hook-info-hashtable.cpp | Tests: hooks "info_hashtable". +// TRANSLATION MISSING +| test-hook-info.cpp | Tests: hooks "info". +// TRANSLATION MISSING +| test-hook-infolist.cpp | Tests: hooks "infolist". +// TRANSLATION MISSING +| test-hook-line.cpp | Tests: hooks "line". +// TRANSLATION MISSING | test-hook-modifier.cpp | Tests: hooks "modifier". +// TRANSLATION MISSING +| test-hook-print.cpp | Tests: hooks "print". +// TRANSLATION MISSING +| test-hook-process.cpp | Tests: hooks "process". +// TRANSLATION MISSING +| test-hook-signal.cpp | Tests: hooks "signal". +// TRANSLATION MISSING +| test-hook-timer.cpp | Tests: hooks "timer". +// TRANSLATION MISSING +| test-hook-url.cpp | Tests: hooks "url". + | gui/ | インターフェースの単体テストを収める最上位ディレクトリ // TRANSLATION MISSING | test-gui-bar-window.cpp | Tests: bar window functions. diff --git a/doc/sr/weechat_dev.sr.adoc b/doc/sr/weechat_dev.sr.adoc index d1a1aa187..700eec4ca 100644 --- a/doc/sr/weechat_dev.sr.adoc +++ b/doc/sr/weechat_dev.sr.adoc @@ -443,7 +443,24 @@ WeeChat „језгро” се налази у следећим директо | test-core-sys.cpp | Тестови: системске функције. | hook/ | Корен unit тестова за куке. | test-hook-command.cpp | Тестови: куке „command”. +| test-hook-command-run.cpp | Тестови: куке „command_run”. +| test-hook-completion.cpp | Тестови: куке „completion”. +| test-hook-config.cpp | Тестови: куке „config”. +| test-hook-connect.cpp | Тестови: куке „connect”. +| test-hook-fd.cpp | Тестови: куке „fd”. +| test-hook-focus.cpp | Тестови: куке „focus”. +| test-hook-hdata.cpp | Тестови: куке „hdata”. +| test-hook-hsignal.cpp | Тестови: куке „hsignal”. +| test-hook-info-hashtable.cpp | Тестови: куке „info_hashtable”. +| test-hook-info.cpp | Тестови: куке „info”. +| test-hook-infolist.cpp | Тестови: куке „infolist”. +| test-hook-line.cpp | Тестови: куке „line”. | test-hook-modifier.cpp | Тестови: куке „modifier”. +| test-hook-print.cpp | Тестови: куке „print”. +| test-hook-process.cpp | Тестови: куке „process”. +| test-hook-signal.cpp | Тестови: куке „signal”. +| test-hook-timer.cpp | Тестови: куке „timer”. +| test-hook-url.cpp | Тестови: куке „url”. | gui/ | Корен unit тестова интерфејса. | test-gui-bar-window.cpp | Тестови: функције прозора траке. | test-gui-buffer.cpp | Тестови: бафер функције. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ecb1b9632..52702d9c4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,7 +70,24 @@ set(LIB_WEECHAT_UNIT_TESTS_CORE_SRC unit/core/test-core-util.cpp unit/core/test-core-sys.cpp unit/core/hook/test-hook-command.cpp + unit/core/hook/test-hook-command-run.cpp + unit/core/hook/test-hook-completion.cpp + unit/core/hook/test-hook-config.cpp + unit/core/hook/test-hook-connect.cpp + unit/core/hook/test-hook-fd.cpp + unit/core/hook/test-hook-focus.cpp + unit/core/hook/test-hook-hdata.cpp + unit/core/hook/test-hook-hsignal.cpp + unit/core/hook/test-hook-info.cpp + unit/core/hook/test-hook-info-hashtable.cpp + unit/core/hook/test-hook-infolist.cpp + unit/core/hook/test-hook-line.cpp unit/core/hook/test-hook-modifier.cpp + unit/core/hook/test-hook-print.cpp + unit/core/hook/test-hook-process.cpp + unit/core/hook/test-hook-signal.cpp + unit/core/hook/test-hook-timer.cpp + unit/core/hook/test-hook-url.cpp unit/gui/test-gui-bar.cpp unit/gui/test-gui-bar-item.cpp unit/gui/test-gui-bar-item-custom.cpp diff --git a/tests/tests.cpp b/tests/tests.cpp index 1702d702b..01557fb07 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -80,7 +80,24 @@ IMPORT_TEST_GROUP(CoreUtil); IMPORT_TEST_GROUP(CoreSys); /* core/hook */ IMPORT_TEST_GROUP(HookCommand); +IMPORT_TEST_GROUP(HookCommandRun); +IMPORT_TEST_GROUP(HookCompletion); +IMPORT_TEST_GROUP(HookConfig); +IMPORT_TEST_GROUP(HookConnect); +IMPORT_TEST_GROUP(HookFd); +IMPORT_TEST_GROUP(HookFocus); +IMPORT_TEST_GROUP(HookHdata); +IMPORT_TEST_GROUP(HookHsignal); +IMPORT_TEST_GROUP(HookInfo); +IMPORT_TEST_GROUP(HookInfoHashtable); +IMPORT_TEST_GROUP(HookInfolist); +IMPORT_TEST_GROUP(HookLine); IMPORT_TEST_GROUP(HookModifier); +IMPORT_TEST_GROUP(HookPrint); +IMPORT_TEST_GROUP(HookProcess); +IMPORT_TEST_GROUP(HookSignal); +IMPORT_TEST_GROUP(HookTimer); +IMPORT_TEST_GROUP(HookUrl); /* GUI */ IMPORT_TEST_GROUP(GuiBar); IMPORT_TEST_GROUP(GuiBarItem); diff --git a/tests/unit/core/hook/test-hook-command-run.cpp b/tests/unit/core/hook/test-hook-command-run.cpp new file mode 100644 index 000000000..a40e59ecc --- /dev/null +++ b/tests/unit/core/hook/test-hook-command-run.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-command-run.cpp - test hook command run functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookCommandRun) +{ +}; + +/* + * Tests functions: + * hook_command_run_get_description + */ + +TEST(HookCommandRun, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_command_run + */ + +TEST(HookCommandRun, CommandRun) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_command_run_exec + */ + +TEST(HookCommandRun, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_command_run_free_data + */ + +TEST(HookCommandRun, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_command_run_add_to_infolist + */ + +TEST(HookCommandRun, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_command_run_print_log + */ + +TEST(HookCommandRun, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-completion.cpp b/tests/unit/core/hook/test-hook-completion.cpp new file mode 100644 index 000000000..bf0dd91a7 --- /dev/null +++ b/tests/unit/core/hook/test-hook-completion.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-completion.cpp - test hook completion functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookCompletion) +{ +}; + +/* + * Tests functions: + * hook_completion_get_description + */ + +TEST(HookCompletion, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_completion + */ + +TEST(HookCompletion, Completion) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_completion_exec + */ + +TEST(HookCompletion, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_completion_free_data + */ + +TEST(HookCompletion, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_completion_add_to_infolist + */ + +TEST(HookCompletion, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_completion_print_log + */ + +TEST(HookCompletion, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-config.cpp b/tests/unit/core/hook/test-hook-config.cpp new file mode 100644 index 000000000..950a56264 --- /dev/null +++ b/tests/unit/core/hook/test-hook-config.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-config.cpp - test hook config functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookConfig) +{ +}; + +/* + * Tests functions: + * hook_config_get_description + */ + +TEST(HookConfig, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_config + */ + +TEST(HookConfig, Config) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_config_exec + */ + +TEST(HookConfig, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_config_free_data + */ + +TEST(HookConfig, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_config_add_to_infolist + */ + +TEST(HookConfig, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_config_print_log + */ + +TEST(HookConfig, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-connect.cpp b/tests/unit/core/hook/test-hook-connect.cpp new file mode 100644 index 000000000..9f68c2873 --- /dev/null +++ b/tests/unit/core/hook/test-hook-connect.cpp @@ -0,0 +1,103 @@ +/* + * test-hook-connect.cpp - test hook connect functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookConnect) +{ +}; + +/* + * Tests functions: + * hook_connect_get_description + */ + +TEST(HookConnect, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_connect + */ + +TEST(HookConnect, Connect) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_connect_gnutls_verify_certificates + */ + +TEST(HookConnect, GnutlsVerifyCertificates) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_connect_gnutls_set_certificates + */ + +TEST(HookConnect, GnutlsSetCertificates) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_connect_free_data + */ + +TEST(HookConnect, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_connect_add_to_infolist + */ + +TEST(HookConnect, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_connect_print_log + */ + +TEST(HookConnect, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-fd.cpp b/tests/unit/core/hook/test-hook-fd.cpp new file mode 100644 index 000000000..61c4e6288 --- /dev/null +++ b/tests/unit/core/hook/test-hook-fd.cpp @@ -0,0 +1,133 @@ +/* + * test-hook-fd.cpp - test hook fd functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookFd) +{ +}; + +/* + * Tests functions: + * hook_fd_get_description + */ + +TEST(HookFd, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_search + */ + +TEST(HookFd, Search) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_realloc_pollfd + */ + +TEST(HookFd, ReallocPollfd) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_add_cb + */ + +TEST(HookFd, AddCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_remove_cb + */ + +TEST(HookFd, RemoveCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd + */ + +TEST(HookFd, Fd) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_exec + */ + +TEST(HookFd, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_free_data + */ + +TEST(HookFd, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_add_to_infolist + */ + +TEST(HookFd, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_fd_print_log + */ + +TEST(HookFd, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-focus.cpp b/tests/unit/core/hook/test-hook-focus.cpp new file mode 100644 index 000000000..6b236ab76 --- /dev/null +++ b/tests/unit/core/hook/test-hook-focus.cpp @@ -0,0 +1,113 @@ +/* + * test-hook-focus.cpp - test hook focus functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookFocus) +{ +}; + +/* + * Tests functions: + * hook_focus_get_description + */ + +TEST(HookFocus, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus + */ + +TEST(HookFocus, Focus) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus_hashtable_map_cb + */ + +TEST(HookFocus, HashtableMapCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus_hashtable_map2_cb + */ + +TEST(HookFocus, HashtableMap2Cb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus_get_data + */ + +TEST(HookFocus, GetData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus_free_data + */ + +TEST(HookFocus, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus_add_to_infolist + */ + +TEST(HookFocus, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_focus_print_log + */ + +TEST(HookFocus, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-hdata.cpp b/tests/unit/core/hook/test-hook-hdata.cpp new file mode 100644 index 000000000..25dbb54ef --- /dev/null +++ b/tests/unit/core/hook/test-hook-hdata.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-hdata.cpp - test hook hdata functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookHdata) +{ +}; + +/* + * Tests functions: + * hook_hdata_get_description + */ + +TEST(HookHdata, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hdata + */ + +TEST(HookHdata, Hdata) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hdata_get + */ + +TEST(HookHdata, Get) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hdata_free_data + */ + +TEST(HookHdata, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hdata_add_to_infolist + */ + +TEST(HookHdata, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hdata_print_log + */ + +TEST(HookHdata, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-hsignal.cpp b/tests/unit/core/hook/test-hook-hsignal.cpp new file mode 100644 index 000000000..8104bda50 --- /dev/null +++ b/tests/unit/core/hook/test-hook-hsignal.cpp @@ -0,0 +1,103 @@ +/* + * test-hook-hsignal.cpp - test hook hsignal functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookHsignal) +{ +}; + +/* + * Tests functions: + * hook_hsignal_get_description + */ + +TEST(HookHsignal, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hsignal + */ + +TEST(HookHsignal, Hsignal) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hsignal_match + */ + +TEST(HookHsignal, Match) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hsignal_send + */ + +TEST(HookHsignal, Send) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hsignal_free_data + */ + +TEST(HookHsignal, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hsignal_add_to_infolist + */ + +TEST(HookHsignal, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_hsignal_print_log + */ + +TEST(HookHsignal, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-info-hashtable.cpp b/tests/unit/core/hook/test-hook-info-hashtable.cpp new file mode 100644 index 000000000..623748d3d --- /dev/null +++ b/tests/unit/core/hook/test-hook-info-hashtable.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-info-hashtable.cpp - test hook info hashtable functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookInfoHashtable) +{ +}; + +/* + * Tests functions: + * hook_info_hashtable_get_description + */ + +TEST(HookInfoHashtable, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_hashtable + */ + +TEST(HookInfoHashtable, InfoHashtable) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_get_hashtable + */ + +TEST(HookInfoHashtable, GetHashtable) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_hashtable_free_data + */ + +TEST(HookInfoHashtable, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_hashtable_add_to_infolist + */ + +TEST(HookInfoHashtable, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_hashtable_print_log + */ + +TEST(HookInfoHashtable, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-info.cpp b/tests/unit/core/hook/test-hook-info.cpp new file mode 100644 index 000000000..b05ec8a77 --- /dev/null +++ b/tests/unit/core/hook/test-hook-info.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-info.cpp - test hook info functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookInfo) +{ +}; + +/* + * Tests functions: + * hook_info_get_description + */ + +TEST(HookInfo, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info + */ + +TEST(HookInfo, Info) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_get + */ + +TEST(HookInfo, Get) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_free_data + */ + +TEST(HookInfo, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_add_to_infolist + */ + +TEST(HookInfo, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_info_print_log + */ + +TEST(HookInfo, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-infolist.cpp b/tests/unit/core/hook/test-hook-infolist.cpp new file mode 100644 index 000000000..e559c9849 --- /dev/null +++ b/tests/unit/core/hook/test-hook-infolist.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-infolist.cpp - test hook infolist functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookInfolist) +{ +}; + +/* + * Tests functions: + * hook_infolist_get_description + */ + +TEST(HookInfolist, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_infolist + */ + +TEST(HookInfolist, Infolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_infolist_get + */ + +TEST(HookInfolist, Get) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_infolist_free_data + */ + +TEST(HookInfolist, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_infolist_add_to_infolist + */ + +TEST(HookInfolist, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_infolist_print_log + */ + +TEST(HookInfolist, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-line.cpp b/tests/unit/core/hook/test-hook-line.cpp new file mode 100644 index 000000000..535993fa3 --- /dev/null +++ b/tests/unit/core/hook/test-hook-line.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-line.cpp - test hook line functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookLine) +{ +}; + +/* + * Tests functions: + * hook_line_get_description + */ + +TEST(HookLine, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_line + */ + +TEST(HookLine, Line) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_line_exec + */ + +TEST(HookLine, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_line_free_data + */ + +TEST(HookLine, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_line_add_to_infolist + */ + +TEST(HookLine, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_line_print_log + */ + +TEST(HookLine, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-print.cpp b/tests/unit/core/hook/test-hook-print.cpp new file mode 100644 index 000000000..fa5c055cf --- /dev/null +++ b/tests/unit/core/hook/test-hook-print.cpp @@ -0,0 +1,93 @@ +/* + * test-hook-print.cpp - test hook print functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookPrint) +{ +}; + +/* + * Tests functions: + * hook_print_get_description + */ + +TEST(HookPrint, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_print + */ + +TEST(HookPrint, Print) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_print_exec + */ + +TEST(HookPrint, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_print_free_data + */ + +TEST(HookPrint, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_print_add_to_infolist + */ + +TEST(HookPrint, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_print_print_log + */ + +TEST(HookPrint, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-process.cpp b/tests/unit/core/hook/test-hook-process.cpp new file mode 100644 index 000000000..e178c3b1a --- /dev/null +++ b/tests/unit/core/hook/test-hook-process.cpp @@ -0,0 +1,193 @@ +/* + * test-hook-process.cpp - test hook process functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookProcess) +{ +}; + +/* + * Tests functions: + * hook_process_get_description + */ + +TEST(HookProcess, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_hashtable + */ + +TEST(HookProcess, Hashtable) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process + */ + +TEST(HookProcess, Process) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_child + */ + +TEST(HookProcess, Child) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_send_buffers + */ + +TEST(HookProcess, SendBuffers) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_add_to_buffer + */ + +TEST(HookProcess, AddToBuffer) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_child_read + */ + +TEST(HookProcess, ChildRead) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_child_read_stdout_cb + */ + +TEST(HookProcess, ChildReadStdoutCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_child_read_stderr_cb + */ + +TEST(HookProcess, ChildReadStderrCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_child_read_until_eof + */ + +TEST(HookProcess, ChildReadUntilEof) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_timer_cb + */ + +TEST(HookProcess, TimerCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_run + */ + +TEST(HookProcess, Run) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_exec + */ + +TEST(HookProcess, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_free_data + */ + +TEST(HookProcess, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_add_to_infolist + */ + +TEST(HookProcess, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_process_print_log + */ + +TEST(HookProcess, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-signal.cpp b/tests/unit/core/hook/test-hook-signal.cpp new file mode 100644 index 000000000..0bd9a459a --- /dev/null +++ b/tests/unit/core/hook/test-hook-signal.cpp @@ -0,0 +1,103 @@ +/* + * test-hook-signal.cpp - test hook signal functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookSignal) +{ +}; + +/* + * Tests functions: + * hook_signal_get_description + */ + +TEST(HookSignal, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_signal + */ + +TEST(HookSignal, Signal) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_signal_match + */ + +TEST(HookSignal, Match) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_signal_send + */ + +TEST(HookSignal, Send) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_signal_free_data + */ + +TEST(HookSignal, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_signal_add_to_infolist + */ + +TEST(HookSignal, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_signal_print_log + */ + +TEST(HookSignal, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-timer.cpp b/tests/unit/core/hook/test-hook-timer.cpp new file mode 100644 index 000000000..3a7e1e43e --- /dev/null +++ b/tests/unit/core/hook/test-hook-timer.cpp @@ -0,0 +1,123 @@ +/* + * test-hook-timer.cpp - test hook timer functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookTimer) +{ +}; + +/* + * Tests functions: + * hook_timer_get_description + */ + +TEST(HookTimer, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_init + */ + +TEST(HookTimer, Init) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer + */ + +TEST(HookTimer, Timer) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_check_system_clock + */ + +TEST(HookTimer, CheckSystemClock) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_get_time_to_next + */ + +TEST(HookTimer, GetTimeToNext) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_exec + */ + +TEST(HookTimer, Exec) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_free_data + */ + +TEST(HookTimer, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_add_to_infolist + */ + +TEST(HookTimer, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_print_log + */ + +TEST(HookTimer, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/hook/test-hook-url.cpp b/tests/unit/core/hook/test-hook-url.cpp new file mode 100644 index 000000000..41f5655eb --- /dev/null +++ b/tests/unit/core/hook/test-hook-url.cpp @@ -0,0 +1,143 @@ +/* + * test-hook-url.cpp - test hook url functions + * + * Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +#include "tests/tests.h" + +extern "C" +{ +#include "src/core/weechat.h" +} + +TEST_GROUP(HookUrl) +{ +}; + +/* + * Tests functions: + * hook_url_get_description + */ + +TEST(HookUrl, GetDescription) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_hashtable_map_cb + */ + +TEST(HookUrl, HashtableMapCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_run_callback + */ + +TEST(HookUrl, RunCallback) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_thread_cleanup + */ + +TEST(HookUrl, ThreadCleanup) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_transfer_thread + */ + +TEST(HookUrl, TransferThread) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_timer_cb + */ + +TEST(HookUrl, TimerCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_transfer + */ + +TEST(HookUrl, Transfer) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url + */ + +TEST(HookUrl, Url) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_free_data + */ + +TEST(HookUrl, FreeData) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_add_to_infolist + */ + +TEST(HookUrl, AddToInfolist) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_url_print_log + */ + +TEST(HookUrl, PrintLog) +{ + /* TODO: write tests */ +} diff --git a/tests/unit/core/test-core-hook.cpp b/tests/unit/core/test-core-hook.cpp index 1d07da30f..4df110267 100644 --- a/tests/unit/core/test-core-hook.cpp +++ b/tests/unit/core/test-core-hook.cpp @@ -31,172 +31,230 @@ TEST_GROUP(CoreHook) /* * Tests functions: - * hook_command_run + * hook_init */ -TEST(CoreHook, CommandRun) +TEST(CoreHook, Init) { /* TODO: write tests */ } /* * Tests functions: - * hook_command + * hook_search_type */ -TEST(CoreHook, Command) +TEST(CoreHook, SearchType) { /* TODO: write tests */ } /* * Tests functions: - * hook_completion + * hook_find_pos */ -TEST(CoreHook, Completion) +TEST(CoreHook, FindPos) { /* TODO: write tests */ } /* * Tests functions: - * hook_config + * hook_add_to_list */ -TEST(CoreHook, Config) +TEST(CoreHook, AddToList) { /* TODO: write tests */ } /* * Tests functions: - * hook_connect + * hook_remove_from_list */ -TEST(CoreHook, Connect) +TEST(CoreHook, RemoveFromList) { /* TODO: write tests */ } /* * Tests functions: - * hook_fd + * hook_remove_deleted */ -TEST(CoreHook, Fd) +TEST(CoreHook, RemoveDeleted) { /* TODO: write tests */ } /* * Tests functions: - * hook_focus + * hook_init_data */ -TEST(CoreHook, Focus) +TEST(CoreHook, InitData) { /* TODO: write tests */ } /* * Tests functions: - * hook_hdata + * hook_valid */ -TEST(CoreHook, Hdata) +TEST(CoreHook, Valid) { /* TODO: write tests */ } /* * Tests functions: - * hook_hsignal + * hook_exec_start */ -TEST(CoreHook, Hsignal) +TEST(CoreHook, ExecStart) { /* TODO: write tests */ } /* * Tests functions: - * hook_info_hashtable + * hook_exec_end */ -TEST(CoreHook, InfoHashtable) +TEST(CoreHook, ExecEnd) { /* TODO: write tests */ } /* * Tests functions: - * hook_info + * hook_callback_start */ -TEST(CoreHook, Info) +TEST(CoreHook, CallbackStart) { /* TODO: write tests */ } /* * Tests functions: - * hook_infolist + * hook_callback_end */ -TEST(CoreHook, Infolist) +TEST(CoreHook, CallbackEnd) { /* TODO: write tests */ } /* * Tests functions: - * hook_line + * hook_get_description */ -TEST(CoreHook, Line) +TEST(CoreHook, GetDescription) { /* TODO: write tests */ } +/* + * Tests functions: + * hook_set + */ + +TEST(CoreHook, Set) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_timer_clean_process_cb + */ + +TEST(CoreHook, TimerCleanProcessCb) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hook_schedule_clean_process + */ + +TEST(CoreHook, ScheduleCleanProcess) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * unhook + */ + +TEST(CoreHook, Unhook) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * unhook_all_plugin + */ + +TEST(CoreHook, UnhookAllPlugin) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * unhook_all + */ + +TEST(CoreHook, UnhookAll) +{ + /* TODO: write tests */ +} /* * Tests functions: - * hook_print + * hook_add_to_infolist_pointer */ -TEST(CoreHook, Print) +TEST(CoreHook, AddToInfolistPointer) { /* TODO: write tests */ } /* * Tests functions: - * hook_process - * hook_process_hashtable + * hook_add_to_infolist_type */ -TEST(CoreHook, Process) +TEST(CoreHook, AddToInfolistType) { /* TODO: write tests */ } /* * Tests functions: - * hook_signal + * hook_add_to_infolist */ -TEST(CoreHook, Signal) +TEST(CoreHook, AddToInfolist) { /* TODO: write tests */ } /* * Tests functions: - * hook_timer + * hook_print_log */ -TEST(CoreHook, Timer) +TEST(CoreHook, PrintLog) { /* TODO: write tests */ } |