micro-test-plus 6.0.1
µTest++ Testing Framework
Loading...
Searching...
No Matches
micro_os_plus::micro_test_plus::utility Namespace Reference

Utility functions for the µTest++ testing framework. More...

Functions

const char * extract_file_name (const char *path) noexcept
 Extracts the file name component from a full path.
bool is_match (std::string_view input, std::string_view pattern)
 Checks whether a string matches a pattern with * and ? wildcards.
std::vector< std::string_view > split (std::string_view input, std::string_view delimiters)
 Splits a string view into a vector of string views.
template<class T, class Delim_T>
requires requires (T s, Delim_T d) { T::npos; s.find_first_of (d, std::size_t{}); s.substr (std::size_t{}, std::size_t{}); }
auto split (T input, Delim_T delim) -> std::vector< T >
 Splits a string into a vector of sub-strings.

Detailed Description

The micro_os_plus::micro_test_plus::utility namespace provides a suite of helper functions for the strings that the tests often check.

These utilities include functions for extracting the file name from a path, for pattern matching (verifying whether a string matches a pattern with * and ? wildcards), and for splitting strings into sub-strings based on delimiters.