forked from boostorg/core
Add tests for all fundamental types
This commit is contained in:
@ -267,6 +267,27 @@ template<class T> std::string type_name( tn_identity<T>, std::string const& suff
|
||||
return typeid_name<T>() + suffix;
|
||||
}
|
||||
|
||||
// integrals
|
||||
|
||||
inline std::string type_name( tn_identity<unsigned>, std::string const& suffix )
|
||||
{
|
||||
return "unsigned" + suffix;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
inline std::string type_name( tn_identity<long long>, std::string const& suffix )
|
||||
{
|
||||
return "long long" + suffix;
|
||||
}
|
||||
|
||||
inline std::string type_name( tn_identity<unsigned long long>, std::string const& suffix )
|
||||
{
|
||||
return "unsigned long long" + suffix;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// cv
|
||||
|
||||
#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
|
||||
|
@ -67,7 +67,42 @@ struct Ch
|
||||
|
||||
int main()
|
||||
{
|
||||
TEST(signed char);
|
||||
TEST(unsigned char);
|
||||
TEST(short);
|
||||
TEST(unsigned short);
|
||||
TEST(int);
|
||||
TEST(unsigned);
|
||||
TEST(long);
|
||||
TEST(unsigned long);
|
||||
TEST(long long);
|
||||
TEST(unsigned long long);
|
||||
|
||||
TEST(char);
|
||||
TEST(wchar_t);
|
||||
#if !defined(BOOST_NO_CXX11_CHAR16_T)
|
||||
TEST(char16_t);
|
||||
#endif
|
||||
#if !defined(BOOST_NO_CXX11_CHAR16_T)
|
||||
TEST(char32_t);
|
||||
#endif
|
||||
#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
|
||||
TEST(char8_t);
|
||||
#endif
|
||||
#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L
|
||||
TEST(std::byte);
|
||||
#endif
|
||||
|
||||
TEST(bool);
|
||||
|
||||
TEST(float);
|
||||
TEST(double);
|
||||
TEST(long double);
|
||||
|
||||
TEST(void);
|
||||
TEST(void const);
|
||||
TEST(void volatile);
|
||||
TEST(void const volatile);
|
||||
|
||||
TEST(A);
|
||||
TEST(B);
|
||||
@ -94,11 +129,6 @@ int main()
|
||||
|
||||
#endif
|
||||
|
||||
TEST(void);
|
||||
TEST(void const);
|
||||
TEST(void volatile);
|
||||
TEST(void const volatile);
|
||||
|
||||
TEST(A*);
|
||||
TEST(B const* volatile*);
|
||||
|
||||
|
Reference in New Issue
Block a user