From 8619deb3d4e2cd847b3814cddfe355b8e32fcbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=83=D0=B4=D0=BA=D0=BE=D0=B2=20=D0=93=D0=BB=D0=B5?= =?UTF-8?q?=D0=B1=20=D0=9E=D0=BB=D0=B5=D0=B3=D0=BE=D0=B2=D0=B8=D1=87?= Date: Mon, 2 Sep 2024 09:19:56 +0300 Subject: [PATCH] Typo fixes in README.md and ut.hpp using codespell --- README.md | 12 ++++++------ include/boost/ut.hpp | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 52e5ee70..427743f5 100644 --- a/README.md +++ b/README.md @@ -1497,12 +1497,12 @@ namespace boost::inline ext::ut::inline v2_1_0 { * Explicitly runs registered test suites * If not called directly test suites are executed with run's destructor * @example return run({.report_errors = true}) - * @param run_cfg.report_errors {default: false} if true it prints the summary after runnig + * @param run_cfg.report_errors {default: false} if true it prints the summary after running */ auto run(run_cfg); /** - * Runs registered test suites if they haven't been explicilty executed already + * Runs registered test suites if they haven't been explicitly executed already */ ~run(); }; @@ -1624,7 +1624,7 @@ namespace boost::inline ext::ut::inline v2_1_0 { ```cpp /** - * Reperesents suite object + * Represents suite object * @example suite _ = []{}; */ struct suite final { @@ -1722,14 +1722,14 @@ namespace boost::inline ext::ut::inline v2_1_0 { /** * Comparison Operator */ - template + template struct eq final { TLhs lhs{}; // Left-hand side operator TRhs rhs{}; // Right-hand side operator /** - * Performs comparison operatation - * @return true if expression is succesful + * Performs comparison operation + * @return true if expression is successful */ [[nodiscard]] constexpr explicit operator bool() const { return lhs == rhs; diff --git a/include/boost/ut.hpp b/include/boost/ut.hpp index 4810d9c2..83446fa9 100644 --- a/include/boost/ut.hpp +++ b/include/boost/ut.hpp @@ -105,7 +105,7 @@ export import std; #include #endif -struct unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct_ { +struct unique_name_for_auto_detect_prefix_and_suffix_length_0123456789_struct_ { }; BOOST_UT_EXPORT @@ -298,29 +298,29 @@ template inline constexpr const std::string_view raw_type_name = get_template_function_name_use_decay_type< - unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct_>(); + unique_name_for_auto_detect_prefix_and_suffix_length_0123456789_struct_>(); inline constexpr const std::size_t raw_length = raw_type_name.length(); inline constexpr const std::string_view need_name = #if defined(_MSC_VER) and not defined(__clang__) "struct " - "unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct_"; + "unique_name_for_auto_detect_prefix_and_suffix_length_0123456789_struct_"; #else - "unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct_"; + "unique_name_for_auto_detect_prefix_and_suffix_length_0123456789_struct_"; #endif inline constexpr const std::size_t need_length = need_name.length(); static_assert(need_length <= raw_length, - "Auto find prefix and suffix lenght broken error 1"); + "Auto find prefix and suffix length broken error 1"); inline constexpr const std::size_t prefix_length = raw_type_name.find(need_name); static_assert(prefix_length != std::string_view::npos, - "Auto find prefix and suffix lenght broken error 2"); + "Auto find prefix and suffix length broken error 2"); static_assert(prefix_length <= raw_length, - "Auto find prefix and suffix lenght broken error 3"); -inline constexpr const std::size_t tail_lenght = raw_length - prefix_length; -static_assert(need_length <= tail_lenght, - "Auto find prefix and suffix lenght broken error 4"); -inline constexpr const std::size_t suffix_length = tail_lenght - need_length; + "Auto find prefix and suffix length broken error 3"); +inline constexpr const std::size_t tail_length = raw_length - prefix_length; +static_assert(need_length <= tail_length, + "Auto find prefix and suffix length broken error 4"); +inline constexpr const std::size_t suffix_length = tail_length - need_length; } // namespace detail