From 9674639280c359c13ba112d8528b887a8a1468f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Musia=C5=82?= <111433005+SpectraL519@users.noreply.github.com> Date: Sat, 17 Feb 2024 15:59:11 +0100 Subject: [PATCH] small aesthetic changes --- .github/workflows/format.yaml | 2 +- README.md | 2 +- test/source/test_argument_name.cpp | 5 +---- test/source/test_argument_parser_add_argument.cpp | 5 +---- test/source/test_argument_parser_info.cpp | 6 ++---- test/source/test_argument_parser_parse_args.cpp | 5 +---- test/source/test_boolean.cpp | 6 +++++- test/source/test_nargs_range.cpp | 5 +---- 8 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 4d2a1c0..6407abd 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -2,7 +2,7 @@ name: format on: push: branches: - - version-1.1 + - '*' pull_request: branches: - master diff --git a/README.md b/README.md index 9097702..f6096e5 100644 --- a/README.md +++ b/README.md @@ -485,7 +485,7 @@ Run the tests: > **NOTE:** The project uses `clang-format-17`. > -> To install this tool on ubuntu run `sudo ./scripts/env/install_clang_format_17.sh`. +> To install this tool on ubuntu run `sudo bash ./scripts/env/install_clang_format_17.sh`. > > On windows you can download the LLVM package from the official LLVM [GitHub release page](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.1) diff --git a/test/source/test_argument_name.cpp b/test/source/test_argument_name.cpp index 9f9d8d0..634a96c 100644 --- a/test/source/test_argument_name.cpp +++ b/test/source/test_argument_name.cpp @@ -7,6 +7,7 @@ #include #include +using namespace ap_testing; using namespace ap::argument::detail; namespace { @@ -27,8 +28,6 @@ argument_name default_argument_name_both_names() { } // namespace -namespace ap_testing { - TEST_SUITE_BEGIN("test_argument_name"); TEST_CASE("argument_name.name member should be correctly " @@ -121,5 +120,3 @@ TEST_CASE("operator<< should push correct data to the output stream") { } TEST_SUITE_END(); - -} // namespace ap_testing diff --git a/test/source/test_argument_parser_add_argument.cpp b/test/source/test_argument_parser_add_argument.cpp index 4a1b89e..24c16cc 100644 --- a/test/source/test_argument_parser_add_argument.cpp +++ b/test/source/test_argument_parser_add_argument.cpp @@ -8,6 +8,7 @@ #include +using namespace ap_testing; using namespace ap::argument; namespace { @@ -20,8 +21,6 @@ constexpr std::string_view other_short_name = "o"; } // namespace -namespace ap_testing { - TEST_SUITE_BEGIN("test_argument_parser_add_argument"); TEST_CASE_FIXTURE(argument_parser_test_fixture, "default_positional_arguments should add the specified arguments") { @@ -141,5 +140,3 @@ TEST_CASE_FIXTURE(argument_parser_test_fixture, "add_flag should throw only when } TEST_SUITE_END(); - -} // namespace ap_testing diff --git a/test/source/test_argument_parser_info.cpp b/test/source/test_argument_parser_info.cpp index b009057..51c99ba 100644 --- a/test/source/test_argument_parser_info.cpp +++ b/test/source/test_argument_parser_info.cpp @@ -5,13 +5,13 @@ #include +using namespace ap_testing; + namespace { const std::string test_name = "test program name"; const std::string test_description = "test program description"; } // namespace -namespace ap_testing { - TEST_SUITE_BEGIN("test_argument_parser_info"); TEST_CASE_FIXTURE(argument_parser_test_fixture, "parser's program name member should be nullopt by default") { @@ -45,5 +45,3 @@ TEST_CASE_FIXTURE(argument_parser_test_fixture, "name() should set the program n } TEST_SUITE_END(); - -} // namespace ap_testing diff --git a/test/source/test_argument_parser_parse_args.cpp b/test/source/test_argument_parser_parse_args.cpp index e7ef0bc..0c12150 100644 --- a/test/source/test_argument_parser_parse_args.cpp +++ b/test/source/test_argument_parser_parse_args.cpp @@ -8,6 +8,7 @@ #include +using namespace ap_testing; using namespace ap::argument; using namespace ap::nargs; @@ -28,8 +29,6 @@ const std::string optional_arg_short_name = "oa"; } // namespace -namespace ap_testing { - TEST_SUITE_BEGIN("test_argument_parser_parse_args"); TEST_SUITE_BEGIN("test_argument_parser_parse_args::_preprocess_input"); @@ -649,5 +648,3 @@ TEST_CASE_FIXTURE( TEST_SUITE_END(); // test_argument_parser_parse_args::values TEST_SUITE_END(); // test_argument_parser_parse_args - -} // namespace ap_testing diff --git a/test/source/test_boolean.cpp b/test/source/test_boolean.cpp index c9571d9..d373965 100644 --- a/test/source/test_boolean.cpp +++ b/test/source/test_boolean.cpp @@ -2,9 +2,11 @@ /* This test file was created to determine whether the doctest library -and test Makefiles have been set up correctly :) +and testing CMakeLists.txt file have been set up correctly :) */ +TEST_SUITE_BEGIN("test_boolean"); + TEST_CASE("true should be true") { REQUIRE(true == true); } @@ -20,3 +22,5 @@ TEST_CASE("false should be false") { TEST_CASE("false should not be true") { REQUIRE_FALSE(false == true); } + +TEST_SUITE_END(); diff --git a/test/source/test_nargs_range.cpp b/test/source/test_nargs_range.cpp index 78bfefd..c7bf3d6 100644 --- a/test/source/test_nargs_range.cpp +++ b/test/source/test_nargs_range.cpp @@ -6,6 +6,7 @@ #include +using namespace ap_testing; using namespace ap::nargs; namespace { @@ -20,8 +21,6 @@ constexpr range::count_type nmax = std::numeric_limits::max() } // namespace -namespace ap_testing { - TEST_SUITE_BEGIN("test_nargs_range"); TEST_CASE("in_range should return true for default range only when n is 1") { @@ -113,5 +112,3 @@ TEST_CASE("range builders should return correct range objects") { } TEST_SUITE_END(); // test_nargs_range - -} // namespace ap_testing