From db92af6e7634080c08dea386ec67ee1c885c9ee9 Mon Sep 17 00:00:00 2001 From: renn0xtek9 Date: Mon, 13 May 2024 10:00:38 +0200 Subject: [PATCH] Remove unecessary items --- .clang-tidy | 2 -- .devcontainer/docker-compose.yml | 7 ----- CMakeLists.txt | 1 - project/probelibrary/benchmark/CMakeLists.txt | 1 - .../probelibrary/tests/probe_benchmark.cpp | 15 ---------- test/CMakeLists.txt | 24 --------------- test/test_gtest_based.cpp | 29 ------------------- test/test_main.cpp | 16 ---------- test/test_script.sh | 5 ---- 9 files changed, 100 deletions(-) delete mode 100644 .devcontainer/docker-compose.yml delete mode 100644 project/probelibrary/tests/probe_benchmark.cpp delete mode 100644 test/CMakeLists.txt delete mode 100644 test/test_gtest_based.cpp delete mode 100644 test/test_main.cpp delete mode 100755 test/test_script.sh diff --git a/.clang-tidy b/.clang-tidy index 987dcb9..7c1d697 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,3 @@ -# (c) Copyright 2020 Samsung # For details about the checks see http://releases.llvm.org/9.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/list.html --- # Some checks are disabled simply because they are aliases, and we don't want to use multiple names for the same check @@ -463,4 +462,3 @@ CheckOptions: - key: zircon-temporary-objects.Names value: '' ... - diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml deleted file mode 100644 index 754e557..0000000 --- a/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: '3.8' -services: - devcontainer: - build: - context: . - dockerfile: Dockerfile - command: sleep infinity \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 98da092..aec3475 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,5 +11,4 @@ INCLUDE (GenerateGitHashAtConfigTime) INCLUDE (GenerateGitHashAtBuildTime) ADD_SUBDIRECTORY (project) -ADD_SUBDIRECTORY (test) ADD_SUBDIRECTORY (documentation) diff --git a/project/probelibrary/benchmark/CMakeLists.txt b/project/probelibrary/benchmark/CMakeLists.txt index ccf5068..ad69fa0 100644 --- a/project/probelibrary/benchmark/CMakeLists.txt +++ b/project/probelibrary/benchmark/CMakeLists.txt @@ -1,4 +1,3 @@ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread") -SET (PROBE_BENCHMARKDIR ${CMAKE_CURRENT_BINARY_DIR}) ADD_EXECUTABLE (probe_benchmark probe_benchmark.cpp) TARGET_LINK_LIBRARIES (probe_benchmark probe) diff --git a/project/probelibrary/tests/probe_benchmark.cpp b/project/probelibrary/tests/probe_benchmark.cpp deleted file mode 100644 index 33044c4..0000000 --- a/project/probelibrary/tests/probe_benchmark.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include - -#include -#include -int main(int argc, char** argv) { - auto start = std::chrono::high_resolution_clock::now(); - Probe(); - auto stop = std::chrono::high_resolution_clock::now(); - - auto duration = std::chrono::duration_cast(stop - start); - - std::cout << "Time taken by function: " << duration.count() << " microseconds" << std::endl; - - return 0; -} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index 41ab54c..0000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -ADD_EXECUTABLE (testexe test_main.cpp) -ADD_TEST (NAME showcase_ctest_using_a_custom_exe_succeeding - COMMAND $ o) -ADD_TEST (NAME showcase_ctest_using_a_custom_exe_failing - COMMAND $ n) -SET_PROPERTY (TEST showcase_ctest_using_a_custom_exe_failing PROPERTY WILL_FAIL - TRUE) - -FIND_PACKAGE (GTest REQUIRED) - -ADD_EXECUTABLE (test_gtest_based test_gtest_based.cpp) -TARGET_LINK_LIBRARIES (test_gtest_based ${GTEST_BOTH_LIBRARIES}) -ADD_TEST (NAME show_case_ctest_using_a_gtest_exe COMMAND $) -SET_PROPERTY (TEST show_case_ctest_using_a_gtest_exe PROPERTY WILL_FAIL TRUE) - -ADD_TEST ( - NAME show_case_ctest_using_a_bash_script - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND /bin/bash ${CMAKE_CURRENT_SOURCE_DIR}/test_script.sh) - -# This is a workaround of a CMake bug which does not write build target for the -# "test" target thus cd build && rm -rf * && cmake .. && make test will not -# work ADD_CUSTOM_TARGET ( specs COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS testexe -# test_gtest_based) diff --git a/test/test_gtest_based.cpp b/test/test_gtest_based.cpp deleted file mode 100644 index 970294a..0000000 --- a/test/test_gtest_based.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include - -void function_that_throw() { - throw std::exception(); -} -void this_function_has_no_except() noexcept { - function_that_throw(); -} - -TEST(WhatHappenIfThrownFromANoExcept, DummyTest) { - this_function_has_no_except(); - EXPECT_EQ(true, true); -} - -TEST(WhatHappenIfFail, DummyTest) { - FAIL(); - EXPECT_EQ(true, true); -}; -TEST(WhatHappenIfThrown, DummyTest) { - function_that_throw(); - EXPECT_EQ(true, true); -} -TEST(WhatHappenIfExit1, DummyTest) { - exit(1); - EXPECT_EQ(true, true); -} -TEST(ThisTestSucceed, DummyTest) { - EXPECT_EQ(true, true); -} diff --git a/test/test_main.cpp b/test/test_main.cpp deleted file mode 100644 index 2a3bcbe..0000000 --- a/test/test_main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include - -int main(int argc, char** argv) { - if (argc < 2) { - std::cout << "Test failed (no argument)" << std::endl; - return 1; - } - if (argv[1][0] == 'o') { - std::cout << "Test OK" << std::endl; - return 0; - } else { - std::cout << "Test FAILED" << std::endl; - return 1; - } - return 1; -} diff --git a/test/test_script.sh b/test/test_script.sh deleted file mode 100755 index 9541042..0000000 --- a/test/test_script.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -./bin/testexe o -if [[ $? != "0" ]] ; then exit 1; fi -./bin/test_gtest_based --gtest_filter=This* -if [[ $? != "0" ]] ; then exit 1; fi