diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-07-20 12:13:25 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-07-20 12:13:25 +0200 |
commit | db9a8e7bc47f5638e6f6c39a5de601cca79a7f7b (patch) | |
tree | 69325326a6e643fc6032bdaff5034d0c3f436a5a /tests/unit/core/test-hdata.cpp | |
parent | 91ce401769b7e3fcdfaf17738c0822d0a1a3729c (diff) | |
download | weechat-db9a8e7bc47f5638e6f6c39a5de601cca79a7f7b.zip |
tests: add unit tests using CppUTest
The tests can be run only via CMake:
1. build with tests: cmake .. -DENABLE_TESTS=ON
2. make
3. ctest (or ctest -V for verbose output)
Diffstat (limited to 'tests/unit/core/test-hdata.cpp')
-rw-r--r-- | tests/unit/core/test-hdata.cpp | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/tests/unit/core/test-hdata.cpp b/tests/unit/core/test-hdata.cpp new file mode 100644 index 000000000..31af084a0 --- /dev/null +++ b/tests/unit/core/test-hdata.cpp @@ -0,0 +1,118 @@ +/* + * test-hdata.cpp - test hdata functions + * + * Copyright (C) 2014 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 <http://www.gnu.org/licenses/>. + */ + +#include "CppUTest/TestHarness.h" + +extern "C" +{ +#include "../src/core/wee-hdata.h" +} + +TEST_GROUP(Hdata) +{ +}; + +/* + * Tests functions: + * hdata_new + * hdata_new_var + * hdata_new_list + */ + +TEST(Hdata, New) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hdata_get_var_offset + * hdata_get_var_type + * hdata_get_var_type_string + * hdata_get_var_array_size + * hdata_get_var_array_size_string + * hdata_get_var_hdata + * hdata_get_var + * hdata_get_var_at_offset + * hdata_get_list + */ + +TEST(Hdata, Get) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hdata_check_pointer + */ + +TEST(Hdata, Check) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hdata_move + * hdata_search + */ + +TEST(Hdata, Move) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hdata_char + * hdata_integer + * hdata_long + * hdata_string + * hdata_pointer + * hdata_time + */ + +TEST(Hdata, Read) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hdata_free_all_plugin + * hdata_free_all + */ + +TEST(Hdata, Free) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: + * hdata_print_log + */ + +TEST(Hdata, PrintLog) +{ + /* TODO: write tests */ +} |