From e1929cf4891a435ed01d0f9f5c990bbe2fd6ab7d Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Mon, 4 Apr 2022 18:03:07 +0200 Subject: [PATCH] iox-#1067 Fix clang-tidy warnings Signed-off-by: Christian Eltzschig --- .../include/iceoryx_hoofs/cxx/type_traits.hpp | 52 +++++++-------- .../iceoryx_hoofs/internal/cxx/helplets.inl | 2 +- .../internal/cxx/storable_function.hpp | 15 +++-- .../internal/cxx/storable_function.inl | 24 +++---- .../iceoryx_hoofs/internal/cxx/string.inl | 10 +-- .../internal/posix_wrapper/command_line.inl | 6 +- .../posix_wrapper/command_line_parser.hpp | 18 +++--- .../posix_wrapper/command_line_parser.inl | 2 + .../posix_wrapper/command_line.hpp | 2 +- iceoryx_hoofs/source/cxx/type_traits.cpp | 26 ++++---- .../posix_wrapper/command_line_parser.cpp | 12 ++-- .../test/moduletests/test_cxx_type_traits.cpp | 64 +++++++++---------- 12 files changed, 120 insertions(+), 113 deletions(-) diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/cxx/type_traits.hpp b/iceoryx_hoofs/include/iceoryx_hoofs/cxx/type_traits.hpp index 918c6201696..ab4f657bbaf 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/cxx/type_traits.hpp +++ b/iceoryx_hoofs/include/iceoryx_hoofs/cxx/type_traits.hpp @@ -49,11 +49,11 @@ using add_const_conditionally_t = typename add_const_conditionally::type; /// /// @brief Helper value to bind a static_assert to a type /// @code -/// static_assert(always_false_v, "Not implemented for the given type!"); +/// static_assert(ALWAYS_FALSE_V, "Not implemented for the given type!"); /// @endcode /// template -constexpr bool always_false_v = false; +constexpr bool ALWAYS_FALSE_V = false; // windows defines __cplusplus as 199711L #if __cplusplus < 201703L && !defined(_WIN32) @@ -80,13 +80,14 @@ struct is_invocable // This is chosen if Callable(ArgTypes) does not resolve to a valid type. template - static constexpr std::false_type test(...) noexcept + static constexpr std::false_type test(...) noexcept // NOLINT, required to accept everything else { return {}; } // Test with nullptr as this can stand in for a pointer to any type. - static constexpr bool value = decltype(test(nullptr))::value; + static constexpr bool value = // NOLINT, we want to be compatible with stl + decltype(test(nullptr))::value; }; /// @@ -106,13 +107,14 @@ struct is_invocable_r } template - static constexpr std::false_type test(...) noexcept + static constexpr std::false_type test(...) noexcept // NOLINT, required to accept everything else { return {}; } // Test with nullptr as this can stand in for a pointer to any type. - static constexpr bool value = decltype(test(nullptr))::value; + static constexpr bool value = // NOLINT, we want to be compatible with stl + decltype(test(nullptr))::value; }; /// @@ -133,108 +135,108 @@ using void_t = void; ////////////////// -/// BEGIN TypeInfo +/// BEGIN type_info ////////////////// /// @brief Provides a translation from a type into its human readable name template -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "unknown type"; }; template -constexpr const char TypeInfo::NAME[]; +constexpr const char type_info::NAME[]; template class string; template -struct TypeInfo> +struct type_info> { static constexpr const char NAME[] = "string"; }; template -constexpr const char TypeInfo>::NAME[]; +constexpr const char type_info>::NAME[]; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "int8_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "int16_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "int32_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "int64_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "uint8_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "uint16_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "uint32_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "uint64_t"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "bool"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "char"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "float"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "double"; }; template <> -struct TypeInfo +struct type_info { static constexpr const char NAME[] = "long double"; }; ////////////////// -/// END TypeInfo +/// END type_info ////////////////// } // namespace cxx } // namespace iox diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/helplets.inl b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/helplets.inl index 15d0dd13218..21f87cbda9e 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/helplets.inl +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/helplets.inl @@ -130,7 +130,7 @@ inline bool isValidFilePath(const string& name) noexcept template constexpr T from(const F) noexcept { - static_assert(always_false_v && always_false_v, "Conversion for the specified types is not implemented!\ + static_assert(ALWAYS_FALSE_V && ALWAYS_FALSE_V, "Conversion for the specified types is not implemented!\ Please specialize `template constexpr T from(const F) noexcept`!"); } diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.hpp b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.hpp index ef6449be1d1..d05bc29bb6c 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.hpp +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.hpp @@ -65,10 +65,12 @@ class storable_function> typename = typename std::enable_if::value && is_invocable_r::value, void>::type> - storable_function(const Functor& functor) noexcept; + storable_function(const Functor& functor) noexcept; // NOLINT, we want that lambdas etc. are implicitly convertable + // to a storable function /// @brief construct from function pointer (including static functions) - storable_function(ReturnType (*function)(Args...)) noexcept; + storable_function(ReturnType (*function)(Args...)) noexcept; // NOLINT, we want that free functions are + // implicitly convertable to a storable function /// @brief construct from object reference and member function /// only a pointer to the object is stored for the call @@ -154,6 +156,7 @@ class storable_function> operations& operator=(const operations& other) noexcept = default; operations(operations&& other) noexcept = default; operations& operator=(operations&& other) noexcept = default; + ~operations() = default; void copy(const storable_function& src, storable_function& dest) noexcept; @@ -178,7 +181,7 @@ class storable_function> typename = typename std::enable_if::value && is_invocable_r::value, void>::type> - void storeFunctor(const Functor& functor) noexcept; + void store_functor(const Functor& functor) noexcept; bool empty() const noexcept; @@ -195,11 +198,11 @@ class storable_function> template static ReturnType invoke(void* callable, Args&&... args); - static void copyFreeFunction(const storable_function& src, storable_function& dest) noexcept; + static void copy_free_function(const storable_function& src, storable_function& dest) noexcept; - static void moveFreeFunction(storable_function& src, storable_function& dest) noexcept; + static void move_free_function(storable_function& src, storable_function& dest) noexcept; - static ReturnType invokeFreeFunction(void* callable, Args&&... args); + static ReturnType invoke_free_function(void* callable, Args&&... args); }; /// @brief swap two storable functions diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.inl b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.inl index a73f25fcfb5..329b3a9b98d 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.inl +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/storable_function.inl @@ -28,7 +28,7 @@ template template storable_function>::storable_function(const Functor& functor) noexcept { - storeFunctor(functor); + store_functor(functor); } template @@ -36,10 +36,10 @@ storable_function>::storable_function(ReturnTy { if (function) { - m_invoker = invokeFreeFunction; + m_invoker = invoke_free_function; m_callable = reinterpret_cast(function); - m_operations.copyFunction = copyFreeFunction; - m_operations.moveFunction = moveFreeFunction; + m_operations.copyFunction = copy_free_function; + m_operations.moveFunction = move_free_function; // destroy is not needed for free functions } } @@ -51,7 +51,7 @@ storable_function>::storable_function(T& objec { auto p = &object; auto functor = [p, method](Args... args) -> ReturnType { return (*p.*method)(std::forward(args)...); }; - storeFunctor(functor); + store_functor(functor); } template @@ -61,7 +61,7 @@ storable_function>::storable_function(const T& { auto p = &object; auto functor = [p, method](Args... args) -> ReturnType { return (*p.*method)(std::forward(args)...); }; - storeFunctor(functor); + store_functor(functor); } template @@ -154,7 +154,7 @@ bool storable_function>::empty() const noexcep template template -void storable_function>::storeFunctor(const Functor& functor) noexcept +void storable_function>::store_functor(const Functor& functor) noexcept { using StoredType = typename std::remove_reference::type; auto ptr = m_storage.template allocate(); @@ -257,16 +257,16 @@ void storable_function>::destroy(storable_func } template -void storable_function>::copyFreeFunction(const storable_function& src, - storable_function& dest) noexcept +void storable_function>::copy_free_function(const storable_function& src, + storable_function& dest) noexcept { dest.m_invoker = src.m_invoker; dest.m_callable = src.m_callable; } template -void storable_function>::moveFreeFunction(storable_function& src, - storable_function& dest) noexcept +void storable_function>::move_free_function(storable_function& src, + storable_function& dest) noexcept { dest.m_invoker = src.m_invoker; dest.m_callable = src.m_callable; @@ -282,7 +282,7 @@ ReturnType storable_function>::invoke(void* ca } template -ReturnType storable_function>::invokeFreeFunction(void* callable, Args&&... args) +ReturnType storable_function>::invoke_free_function(void* callable, Args&&... args) { return (reinterpret_cast(callable))(std::forward(args)...); } diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/string.inl b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/string.inl index 4bece608d62..d122e65d979 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/string.inl +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/string.inl @@ -368,7 +368,7 @@ inline std::ostream& operator<<(std::ostream& stream, const string& st template inline bool string::operator==(const char* const) const noexcept { - static_assert(cxx::always_false_v>, + static_assert(cxx::ALWAYS_FALSE_V>, "The equality operator for fixed string and char pointer is disabled, because it may lead to " "undefined behavior if the char array is not null-terminated. Please convert the char array to a " "fixed string with string(TruncateToCapacity_t, const char* const other, const uint64_t count) " @@ -379,7 +379,7 @@ inline bool string::operator==(const char* const) const noexcept template inline bool string::operator!=(const char* const) const noexcept { - static_assert(cxx::always_false_v>, + static_assert(cxx::ALWAYS_FALSE_V>, "The inequality operator for fixed string and char pointer is disabled, because it may lead to " "undefined behavior if the char array is not null-terminated. Please convert the char array to a " "fixed string with string(TruncateToCapacity_t, const char* const other, const uint64_t count) " @@ -390,7 +390,7 @@ inline bool string::operator!=(const char* const) const noexcept template inline bool operator==(const char* const, const string&) noexcept { - static_assert(cxx::always_false_v>, + static_assert(cxx::ALWAYS_FALSE_V>, "The equality operator for char pointer and fixed string is disabled, because it may lead to " "undefined behavior if the char array is not null-terminated. Please convert the char array to a " "fixed string with string(TruncateToCapacity_t, const char* const other, const uint64_t count) " @@ -401,7 +401,7 @@ inline bool operator==(const char* const, const string&) noexcept template inline bool operator!=(const char* const, const string&) noexcept { - static_assert(cxx::always_false_v>, + static_assert(cxx::ALWAYS_FALSE_V>, "The inequality operator for char pointer and fixed string is disabled, because it may lead to " "undefined behavior if the char array is not null-terminated. Please convert the char array to a " "fixed string with string(TruncateToCapacity_t, const char* const other, const uint64_t count) " @@ -413,7 +413,7 @@ template template inline string& string::operator+=(const T&) noexcept { - static_assert(cxx::always_false_v>, + static_assert(cxx::ALWAYS_FALSE_V>, "operator += is not supported by cxx::string, please use append or unsafe_append instead"); return *this; } diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line.inl b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line.inl index cbf068b0983..9bee6a10580 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line.inl +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line.inl @@ -70,12 +70,12 @@ inline T addEntry(const CommandLineParser& parser, internal::cmdEntries_t& entries, internal::cmdAssignments_t& assignments) { - entries.emplace_back(CommandLineParser::entry_t{ + entries.emplace_back(CommandLineParser::Entry{ shortName, name, description, argumentType, - {cxx::TypeInfo::NAME}, + {cxx::type_info::NAME}, CommandLineOptions::value_t(cxx::TruncateToCapacity, cxx::convert::toString(defaultValue))}); assignments.emplace_back([&parser, &value, &entries, index = entries.size() - 1](CommandLineOptions& options) { extractValue(parser, value, entries, index, options); @@ -94,7 +94,7 @@ inline bool addEntry(const CommandLineParser& parser, internal::cmdEntries_t& entries, internal::cmdAssignments_t& assignments) { - entries.emplace_back(CommandLineParser::entry_t{ + entries.emplace_back(CommandLineParser::Entry{ shortName, name, description, diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.hpp b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.hpp index 538d3f65456..f595a2d9aa7 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.hpp +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.hpp @@ -94,7 +94,7 @@ class IOX_NO_DISCARD CommandLineOptions cxx::expected convertFromString(const value_t& value) const noexcept; private: - struct argument_t + struct Argument { char shortId; name_t id; @@ -102,7 +102,7 @@ class IOX_NO_DISCARD CommandLineOptions }; binaryName_t m_binaryName; - cxx::vector m_arguments; + cxx::vector m_arguments; }; /// @brief Factory class for the CommandLineOptions. First one has to register @@ -174,7 +174,7 @@ class CommandLineParser const uint64_t argcOffset = 1U, const UnknownOption actionWhenOptionUnknown = UnknownOption::TERMINATE) noexcept; - struct entry_t + struct Entry { char shortOption = NO_SHORT_OPTION; CommandLineOptions::name_t longOption; @@ -187,8 +187,8 @@ class CommandLineParser private: friend void internal::handleError(const CommandLineParser&); - CommandLineParser& addOption(const entry_t& option) noexcept; - cxx::optional getOption(const CommandLineOptions::name_t& name) const noexcept; + CommandLineParser& addOption(const Entry& option) noexcept; + cxx::optional getOption(const CommandLineOptions::name_t& name) const noexcept; void printHelpAndExit() const noexcept; /// BEGIN only used in parse to improve readability @@ -206,9 +206,9 @@ class CommandLineParser bool hasValidOptionName(const char* option) const noexcept; bool doesOptionNameFitIntoString(const char* option) const noexcept; bool isNextArgumentAValue(const uint64_t position) const noexcept; - bool isOptionSet(const entry_t& entry) const noexcept; + bool isOptionSet(const Entry& entry) const noexcept; bool doesOptionValueFitIntoString(const char* value) const noexcept; - bool doesOptionHasSucceedingValue(const entry_t& entry, const uint64_t position) const noexcept; + bool doesOptionHasSucceedingValue(const Entry& entry, const uint64_t position) const noexcept; /// END only used in parse to improve readability void sortAvailableOptions() noexcept; @@ -220,12 +220,12 @@ class CommandLineParser uint64_t m_argcOffset = 0; description_t m_programDescription; - cxx::vector m_availableOptions; + cxx::vector m_availableOptions; cxx::function m_onFailureCallback; CommandLineOptions m_options; }; -std::ostream& operator<<(std::ostream& stream, const CommandLineParser::entry_t& entry) noexcept; +std::ostream& operator<<(std::ostream& stream, const CommandLineParser::Entry& entry) noexcept; } // namespace posix } // namespace iox diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.inl b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.inl index c3cc0509792..b3994780ebf 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.inl +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/command_line_parser.inl @@ -16,6 +16,8 @@ #ifndef IOX_HOOFS_POSIX_WRAPPER_COMMAND_LINE_PARSER_INL #define IOX_HOOFS_POSIX_WRAPPER_COMMAND_LINE_PARSER_INL +#include "iceoryx_hoofs/internal/posix_wrapper/command_line_parser.hpp" + namespace iox { namespace posix diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/command_line.hpp b/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/command_line.hpp index ec5942abbe3..baa4b148f95 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/command_line.hpp +++ b/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/command_line.hpp @@ -28,7 +28,7 @@ namespace posix { namespace internal { -using cmdEntries_t = cxx::vector; +using cmdEntries_t = cxx::vector; using cmdAssignments_t = cxx::vector, CommandLineOptions::MAX_NUMBER_OF_ARGUMENTS>; diff --git a/iceoryx_hoofs/source/cxx/type_traits.cpp b/iceoryx_hoofs/source/cxx/type_traits.cpp index d17e6776f9c..c70064b9d1f 100644 --- a/iceoryx_hoofs/source/cxx/type_traits.cpp +++ b/iceoryx_hoofs/source/cxx/type_traits.cpp @@ -20,18 +20,18 @@ namespace iox { namespace cxx { -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; -constexpr const char TypeInfo::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; +constexpr const char type_info::NAME[]; } // namespace cxx } // namespace iox diff --git a/iceoryx_hoofs/source/posix_wrapper/command_line_parser.cpp b/iceoryx_hoofs/source/posix_wrapper/command_line_parser.cpp index 71dacc3cfbf..ef41d26a37a 100644 --- a/iceoryx_hoofs/source/posix_wrapper/command_line_parser.cpp +++ b/iceoryx_hoofs/source/posix_wrapper/command_line_parser.cpp @@ -132,7 +132,7 @@ bool CommandLineParser::isNextArgumentAValue(const uint64_t position) const noex && m_argv[position + 1][0] != '-')); } -bool CommandLineParser::isOptionSet(const entry_t& entry) const noexcept +bool CommandLineParser::isOptionSet(const Entry& entry) const noexcept { bool isOptionSet = false; for (const auto& option : m_options.m_arguments) @@ -170,7 +170,7 @@ bool CommandLineParser::doesOptionValueFitIntoString(const char* value) const no void CommandLineParser::sortAvailableOptions() noexcept { - std::sort(m_availableOptions.begin(), m_availableOptions.end(), [](const entry_t& lhs, const entry_t& rhs) { + std::sort(m_availableOptions.begin(), m_availableOptions.end(), [](const Entry& lhs, const Entry& rhs) { if (lhs.shortOption != NO_SHORT_OPTION && rhs.shortOption != NO_SHORT_OPTION) { return lhs.shortOption < rhs.shortOption; @@ -284,7 +284,7 @@ CommandLineOptions CommandLineParser::parse(int argc, return m_options; } -bool CommandLineParser::doesOptionHasSucceedingValue(const entry_t& entry, const uint64_t position) const noexcept +bool CommandLineParser::doesOptionHasSucceedingValue(const Entry& entry, const uint64_t position) const noexcept { bool doesOptionHasSucceedingValue = (position + 1 < static_cast(m_argc)); if (!doesOptionHasSucceedingValue) @@ -325,7 +325,7 @@ void CommandLineParser::setDefaultValuesToUnsetOptions() noexcept } } -cxx::optional +cxx::optional CommandLineParser::getOption(const CommandLineOptions::name_t& name) const noexcept { const auto nameSize = name.size(); @@ -449,7 +449,7 @@ void CommandLineParser::printHelpAndExit() const noexcept m_onFailureCallback(); } -CommandLineParser& CommandLineParser::addOption(const entry_t& option) noexcept +CommandLineParser& CommandLineParser::addOption(const Entry& option) noexcept { if (option.longOption.empty() && option.shortOption == NO_SHORT_OPTION) { @@ -507,7 +507,7 @@ CommandLineParser& CommandLineParser::addRequiredValue(const char shortOption, return addOption({shortOption, longOption, description, ArgumentType::REQUIRED_VALUE, typeName, {""}}); } -std::ostream& operator<<(std::ostream& stream, const CommandLineParser::entry_t& entry) noexcept +std::ostream& operator<<(std::ostream& stream, const CommandLineParser::Entry& entry) noexcept { if (entry.shortOption != CommandLineParser::NO_SHORT_OPTION) { diff --git a/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp b/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp index d5c23293bb7..f9b61d1eb17 100644 --- a/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp +++ b/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp @@ -141,7 +141,7 @@ TEST(TypeTraitsTest, AlwaysFalseWorks) struct Foo { }; - EXPECT_FALSE(always_false_v); + EXPECT_FALSE(ALWAYS_FALSE_V); } TEST(TypeTraitsTest, IsFunctionPointerResolvesToTrue) @@ -174,79 +174,79 @@ struct UndefinedType { }; -TEST(TypeTraitsTest, TypeInfo_UndefinedTypeTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_UndefinedTypeTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("unknown type")); + EXPECT_THAT(type_info::NAME, StrEq("unknown type")); } -TEST(TypeTraitsTest, TypeInfo_StringTypeTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_StringTypeTranslatesCorrectly) { - EXPECT_THAT(TypeInfo>::NAME, StrEq("string")); - EXPECT_THAT(TypeInfo>::NAME, StrEq("string")); + EXPECT_THAT(type_info>::NAME, StrEq("string")); + EXPECT_THAT(type_info>::NAME, StrEq("string")); } -TEST(TypeTraitsTest, TypeInfo_int8_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_int8_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("int8_t")); + EXPECT_THAT(type_info::NAME, StrEq("int8_t")); } -TEST(TypeTraitsTest, TypeInfo_int16_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_int16_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("int16_t")); + EXPECT_THAT(type_info::NAME, StrEq("int16_t")); } -TEST(TypeTraitsTest, TypeInfo_int32_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_int32_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("int32_t")); + EXPECT_THAT(type_info::NAME, StrEq("int32_t")); } -TEST(TypeTraitsTest, TypeInfo_int64_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_int64_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("int64_t")); + EXPECT_THAT(type_info::NAME, StrEq("int64_t")); } -TEST(TypeTraitsTest, TypeInfo_uint8_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_uint8_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("uint8_t")); + EXPECT_THAT(type_info::NAME, StrEq("uint8_t")); } -TEST(TypeTraitsTest, TypeInfo_uint16_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_uint16_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("uint16_t")); + EXPECT_THAT(type_info::NAME, StrEq("uint16_t")); } -TEST(TypeTraitsTest, TypeInfo_uint32_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_uint32_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("uint32_t")); + EXPECT_THAT(type_info::NAME, StrEq("uint32_t")); } -TEST(TypeTraitsTest, TypeInfo_uint64_tTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_uint64_tTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("uint64_t")); + EXPECT_THAT(type_info::NAME, StrEq("uint64_t")); } -TEST(TypeTraitsTest, TypeInfo_boolTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_boolTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("bool")); + EXPECT_THAT(type_info::NAME, StrEq("bool")); } -TEST(TypeTraitsTest, TypeInfo_charTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_charTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("char")); + EXPECT_THAT(type_info::NAME, StrEq("char")); } -TEST(TypeTraitsTest, TypeInfo_floatTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_floatTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("float")); + EXPECT_THAT(type_info::NAME, StrEq("float")); } -TEST(TypeTraitsTest, TypeInfo_doubleTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_doubleTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("double")); + EXPECT_THAT(type_info::NAME, StrEq("double")); } -TEST(TypeTraitsTest, TypeInfo_long_doubleTranslatesCorrectly) +TEST(TypeTraitsTest, type_info_long_doubleTranslatesCorrectly) { - EXPECT_THAT(TypeInfo::NAME, StrEq("long double")); + EXPECT_THAT(type_info::NAME, StrEq("long double")); } } // namespace