Skip to content

Commit

Permalink
style: pre-commit.ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 20, 2024
1 parent 5cac5b1 commit 9c704bb
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion include/CLI/impl/App_inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ CLI11_INLINE Option *App::add_option(std::string option_name,
if(opt->snames_.empty()) {
continue;

Check warning on line 209 in include/CLI/impl/App_inl.hpp

View check run for this annotation

Codecov / codecov/patch

include/CLI/impl/App_inl.hpp#L209

Added line #L209 was not covered by tests
}
for(const auto& osn : opt->snames_) {
for(const auto &osn : opt->snames_) {
if(osn.size() > 1) {
std::string test_name;
test_name.push_back(osn.front());
Expand Down
15 changes: 7 additions & 8 deletions tests/BoostOptionTypeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
#include <utility>
#include <vector>


using small_vector=boost::container::small_vector;
using flat_set=boost::container::flat_set;
using flat_map=boost::container::flat_map;
using slist=boost::container::slist;
using stable_vector=boost::container::stable_vector;
using static_vector=boost::container::static_vector;
using vector=boost::container::vector;
using small_vector = boost::container::small_vector;
using flat_set = boost::container::flat_set;
using flat_map = boost::container::flat_map;
using slist = boost::container::slist;
using stable_vector = boost::container::stable_vector;
using static_vector = boost::container::static_vector;
using vector = boost::container::vector;

TEMPLATE_TEST_CASE("Boost container single",
"[boost][optional]",
Expand Down
4 changes: 2 additions & 2 deletions tests/ConfigFileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "app_helper.hpp"

#include <cstdio>
#include <sstream>
#include <memory>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
#include <string>

TEST_CASE("StringBased: convert_arg_for_ini", "[config]") {

Expand Down
2 changes: 1 addition & 1 deletion tests/FormatterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "catch.hpp"
#include <fstream>
#include <string>
#include <memory>
#include <string>

class SimpleFormatter : public CLI::FormatterBase {
public:
Expand Down
2 changes: 1 addition & 1 deletion tests/HelpTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "catch.hpp"
#include <fstream>
#include <set>
#include <vector>
#include <string>
#include <vector>

TEST_CASE("THelp: Basic", "[help]") {
CLI::App app{"My prog"};
Expand Down
2 changes: 1 addition & 1 deletion tests/NewParseTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <complex>
#include <cstdint>
#include <utility>
#include <string>
#include <utility>
#include <vector>

using cx = std::complex<double>;
Expand Down
2 changes: 1 addition & 1 deletion tests/OptionGroupTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "app_helper.hpp"

#include <memory>
#include <vector>
#include <string>
#include <vector>

using vs_t = std::vector<std::string>;

Expand Down
6 changes: 3 additions & 3 deletions tests/OptionTypeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
#include <cstdlib>
#include <deque>
#include <forward_list>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <string>
#include <tuple>
#include <limits>

using Catch::literals::operator"" _a;

Expand Down
4 changes: 2 additions & 2 deletions tests/SetTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#include "app_helper.hpp"
#include <map>
#include <memory>
#include <string>
#include <set>
#include <vector>
#include <string>
#include <utility>
#include <vector>

static_assert(CLI::is_shared_ptr<std::shared_ptr<int>>::value == true, "is_shared_ptr should work on shared pointers");
static_assert(CLI::is_shared_ptr<int *>::value == false, "is_shared_ptr should work on pointers");
Expand Down
4 changes: 2 additions & 2 deletions tests/SubcommandTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// SPDX-License-Identifier: BSD-3-Clause

#include "app_helper.hpp"
#include <vector>
#include <utility>
#include <memory>
#include <string>
#include <utility>
#include <vector>

using vs_t = std::vector<std::string>;

Expand Down
2 changes: 1 addition & 1 deletion tests/TimerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#include "catch.hpp"
#include <chrono>
#include <iostream>
#include <sstream>
#include <string>
#include <thread>
#include <iostream>

TEST_CASE("Timer: MSTimes", "[timer]") {
CLI::Timer timer{"My Timer"};
Expand Down
7 changes: 3 additions & 4 deletions tests/TransformTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
#include <array>
#include <chrono>
#include <cstdint>
#include <unordered_map>
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include <map>
#include <vector>
#include <memory>


#if defined(CLI11_CPP17)
#if defined(__has_include)
Expand Down

0 comments on commit 9c704bb

Please sign in to comment.