From 6e048a2d3fffccdc043dcaad8f84728b214b2a54 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 30 Nov 2018 14:40:47 +0100 Subject: [PATCH] Remove check_csync_util It's testing nothing. Only that one can convert a csync instruction to a string. But this is only used in debug anyway Relates to #6358 --- test/csync/CMakeLists.txt | 1 - test/csync/csync_tests/check_csync_util.cpp | 53 --------------------- 2 files changed, 54 deletions(-) delete mode 100644 test/csync/csync_tests/check_csync_util.cpp diff --git a/test/csync/CMakeLists.txt b/test/csync/CMakeLists.txt index cdb45d81e..28d224377 100644 --- a/test/csync/CMakeLists.txt +++ b/test/csync/CMakeLists.txt @@ -26,7 +26,6 @@ add_cmocka_test(check_std_c_str std_tests/check_std_c_str.c ${TEST_TARGET_LIBRAR # csync tests add_cmocka_test(check_csync_exclude csync_tests/check_csync_exclude.cpp ${TEST_TARGET_LIBRARIES}) add_cmocka_test(check_csync_util csync_tests/check_csync_util.cpp ${TEST_TARGET_LIBRARIES}) -add_cmocka_test(check_csync_misc csync_tests/check_csync_misc.cpp ${TEST_TARGET_LIBRARIES}) # vio add_cmocka_test(check_vio_ext vio_tests/check_vio_ext.cpp ${TEST_TARGET_LIBRARIES}) diff --git a/test/csync/csync_tests/check_csync_util.cpp b/test/csync/csync_tests/check_csync_util.cpp deleted file mode 100644 index 53be6b567..000000000 --- a/test/csync/csync_tests/check_csync_util.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * libcsync -- a library to sync a directory with another - * - * Copyright (c) 2008-2013 by Andreas Schneider - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "csync_util.h" - -#include "torture.h" - -static void check_csync_instruction_str(void **state) -{ - const char *str = nullptr; - - (void) state; /* unused */ - - str = csync_instruction_str(CSYNC_INSTRUCTION_ERROR); - assert_string_equal(str, "INSTRUCTION_ERROR"); - - str = csync_instruction_str((enum csync_instructions_e)0xFFFF); - assert_string_equal(str, "ERROR!"); -} - -static void check_csync_memstat(void **state) -{ - (void) state; /* unused */ - - csync_memstat_check(); -} - -int torture_run_tests(void) -{ - const struct CMUnitTest tests[] = { - cmocka_unit_test(check_csync_instruction_str), - cmocka_unit_test(check_csync_memstat), - }; - - return cmocka_run_group_tests(tests, nullptr, nullptr); -} - -- 2.30.2