@@ -39,16 +39,6 @@ namespace cucumber_cpp::library
3939{
4040 namespace
4141 {
42- std::string_view const_char_to_sv (const char * value)
43- {
44- return { value };
45- }
46-
47- std::string_view subrange_to_sv (const auto & subrange)
48- {
49- return { std::data (subrange), std::data (subrange) + std::size (subrange) };
50- }
51-
5242 template <class Range >
5343 std::string Join (const Range& range, std::string_view delim)
5444 {
@@ -57,26 +47,16 @@ namespace cucumber_cpp::library
5747
5848 return std::accumulate (std::next (range.begin ()), range.end (), range.front (), [&delim](const auto & lhs, const auto & rhs)
5949 {
60- std::string join;
61- join.reserve (lhs.size () + delim.size () + rhs.size ());
62- join.append (lhs);
63- join.append (delim);
64- join.append (rhs);
65- return join;
50+ return std::format (" {}{}{}" , lhs, delim, rhs);
6651 });
6752 }
6853
69- std::string JoinStringWithSpace (const std::string& a, const std::string& b)
70- {
71- return a + ' ' + b;
72- }
73-
74- std::filesystem::path to_fs_path (const std::string_view& sv)
54+ std::filesystem::path ToFileSystemPath (const std::string_view& sv)
7555 {
7656 return { sv };
7757 }
7858
79- bool is_feature_file (const std::filesystem::directory_entry& entry)
59+ bool IsFeatureFile (const std::filesystem::directory_entry& entry)
8060 {
8161 return std::filesystem::is_regular_file (entry) && entry.path ().has_extension () && entry.path ().extension () == " .feature" ;
8262 }
@@ -85,9 +65,9 @@ namespace cucumber_cpp::library
8565 {
8666 std::vector<std::filesystem::path> files;
8767
88- for (const auto feature : options.features | std::views::transform (to_fs_path ))
68+ for (const auto feature : options.features | std::views::transform (ToFileSystemPath ))
8969 if (std::filesystem::is_directory (feature))
90- for (const auto & entry : std::filesystem::directory_iterator{ feature } | std::views::filter (is_feature_file ))
70+ for (const auto & entry : std::filesystem::directory_iterator{ feature } | std::views::filter (IsFeatureFile ))
9171 files.emplace_back (entry.path ());
9272 else
9373 files.emplace_back (feature);
@@ -107,26 +87,7 @@ namespace cucumber_cpp::library
10787 else
10888 return std::string{};
10989 })
110- {
111- }
112-
113- ResultStatus& ResultStatus::operator =(Result result)
114- {
115- if ((resultStatus == Result::undefined || resultStatus == Result::passed) && result != Result::undefined)
116- resultStatus = result;
117-
118- return *this ;
119- }
120-
121- ResultStatus::operator Result () const
122- {
123- return resultStatus;
124- }
125-
126- bool ResultStatus::IsSuccess () const
127- {
128- return resultStatus == Result::passed;
129- }
90+ {}
13091
13192 Application::Application (std::shared_ptr<ContextStorageFactory> contextStorageFactory)
13293 : contextManager{ std::move (contextStorageFactory) }
0 commit comments