Remove check_csync_util
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 30 Nov 2018 13:40:47 +0000 (14:40 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:28 +0000 (10:58 +0100)
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
test/csync/csync_tests/check_csync_util.cpp [deleted file]

index cdb45d81eccf33244b7667eb62cb616801b08d83..28d22437739a5804a0d134171232a2a5d51ab3ad 100644 (file)
@@ -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 (file)
index 53be6b5..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * libcsync -- a library to sync a directory with another
- *
- * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
- *
- * 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);
-}
-