Fix tests

This commit is contained in:
Franz Pöschel
2025-05-16 15:57:17 +02:00
parent 5b3d75e2db
commit 1c3ee2857b
5 changed files with 18 additions and 0 deletions

View File

@@ -19,11 +19,14 @@
namespace toml namespace toml
{ {
inline namespace TOML11_INLINE_VERSION_NAMESPACE
{
namespace detail namespace detail
{ {
std::tm localtime_s(const std::time_t* src); std::tm localtime_s(const std::time_t* src);
std::tm gmtime_s(const std::time_t* src); std::tm gmtime_s(const std::time_t* src);
} // detail } // detail
} // TOML11_INLINE_VERSION_NAMESPACE
} // toml } // toml
TEST_CASE("testing toml::find with toml type") TEST_CASE("testing toml::find with toml type")

View File

@@ -19,11 +19,14 @@
namespace toml namespace toml
{ {
inline namespace TOML11_INLINE_VERSION_NAMESPACE
{
namespace detail namespace detail
{ {
std::tm localtime_s(const std::time_t* src); std::tm localtime_s(const std::time_t* src);
std::tm gmtime_s(const std::time_t* src); std::tm gmtime_s(const std::time_t* src);
} // detail } // detail
} // TOML11_INLINE_VERSION_NAMESPACE
} // toml } // toml
TEST_CASE("testing toml::get with toml types") TEST_CASE("testing toml::get with toml types")

View File

@@ -76,6 +76,8 @@ struct corge
namespace toml namespace toml
{ {
inline namespace TOML11_INLINE_VERSION_NAMESPACE
{
template<> template<>
struct from<extlib::foo> struct from<extlib::foo>
{ {
@@ -113,6 +115,7 @@ struct into<extlib::qux>
return toml::basic_value<TC>(typename toml::basic_value<TC>::table_type{{"a", f.a}, {"b", f.b}}); return toml::basic_value<TC>(typename toml::basic_value<TC>::table_type{{"a", f.a}, {"b", f.b}});
} }
}; };
} // TOML11_INLINE_VERSION_NAMESPACE
} // toml } // toml
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -167,6 +170,8 @@ struct foobar
namespace toml namespace toml
{ {
inline namespace TOML11_INLINE_VERSION_NAMESPACE
{
template<> template<>
struct from<extlib2::foo> struct from<extlib2::foo>
{ {
@@ -209,6 +214,7 @@ struct into<extlib2::qux>
}; };
} }
}; };
} // TOML11_INLINE_VERSION_NAMESPACE
} // toml } // toml
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -25,6 +25,8 @@ void test_scan_failure(const toml::detail::scanner_base& s,
namespace toml namespace toml
{ {
inline namespace TOML11_INLINE_VERSION_NAMESPACE
{
std::ostream& operator<<(std::ostream& os, const integer_format_info& fmt) std::ostream& operator<<(std::ostream& os, const integer_format_info& fmt)
{ {
@@ -102,4 +104,5 @@ std::ostream& operator<<(std::ostream& os, const table_format_info& fmt)
return os; return os;
} }
} // TOML11_INLINE_VERSION_NAMESPACE
} // toml } // toml

View File

@@ -86,6 +86,8 @@ void toml11_test_parse_failure(F fn, std::string in, toml::detail::context<TC> c
namespace toml namespace toml
{ {
inline namespace TOML11_INLINE_VERSION_NAMESPACE
{
std::ostream& operator<<(std::ostream& os, const integer_format_info&); std::ostream& operator<<(std::ostream& os, const integer_format_info&);
std::ostream& operator<<(std::ostream& os, const floating_format_info&); std::ostream& operator<<(std::ostream& os, const floating_format_info&);
std::ostream& operator<<(std::ostream& os, const string_format_info&); std::ostream& operator<<(std::ostream& os, const string_format_info&);
@@ -96,5 +98,6 @@ std::ostream& operator<<(std::ostream& os, const local_time_format_info&);
std::ostream& operator<<(std::ostream& os, const array_format_info&); std::ostream& operator<<(std::ostream& os, const array_format_info&);
std::ostream& operator<<(std::ostream& os, const table_format_info&); std::ostream& operator<<(std::ostream& os, const table_format_info&);
} // TOML11_INLINE_VERSION_NAMESPACE
} // toml } // toml
#endif// TOML11_TEST_UTILITY_HPP #endif// TOML11_TEST_UTILITY_HPP