1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

tests: split hook tests into multiple files (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-26 08:41:10 +02:00
parent 6cf163f00c
commit 828ca37225
24 changed files with 2073 additions and 44 deletions
+17
View File
@@ -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.
+17
View File
@@ -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.
+35
View File
@@ -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.
+17
View File
@@ -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 | Тестови: бафер функције.
+17
View File
@@ -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
+17
View File
@@ -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);
@@ -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 */
}
@@ -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 */
}
+93
View File
@@ -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 */
}
+103
View File
@@ -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 */
}
+133
View File
@@ -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 */
}
+113
View File
@@ -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 */
}
+93
View File
@@ -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 */
}
+103
View File
@@ -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 */
}
@@ -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 */
}
+93
View File
@@ -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 */
}
@@ -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 */
}
+93
View File
@@ -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 */
}
+93
View File
@@ -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 */
}
+193
View File
@@ -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 */
}
+103
View File
@@ -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 */
}
+123
View File
@@ -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 */
}
+143
View File
@@ -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 */
}
+102 -44
View File
@@ -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)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_print
*/
TEST(CoreHook, Print)
TEST(CoreHook, GetDescription)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_process
* hook_process_hashtable
* hook_set
*/
TEST(CoreHook, Process)
TEST(CoreHook, Set)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_signal
* hook_timer_clean_process_cb
*/
TEST(CoreHook, Signal)
TEST(CoreHook, TimerCleanProcessCb)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_timer
* hook_schedule_clean_process
*/
TEST(CoreHook, Timer)
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_add_to_infolist_pointer
*/
TEST(CoreHook, AddToInfolistPointer)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_add_to_infolist_type
*/
TEST(CoreHook, AddToInfolistType)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_add_to_infolist
*/
TEST(CoreHook, AddToInfolist)
{
/* TODO: write tests */
}
/*
* Tests functions:
* hook_print_log
*/
TEST(CoreHook, PrintLog)
{
/* TODO: write tests */
}