Fix testsuite failures with --disable-wchar_t
* testsuite/21_strings/basic_string/literals/types.cc: Guard use of wchar_t with _GLIBCXX_USE_WCHAR_T. * testsuite/21_strings/basic_string/literals/values.cc: Likewise. * testsuite/21_strings/basic_string/requirements/citerators.cc: Likewise. * testsuite/22_locale/messages/13631.cc: Likewise. * testsuite/experimental/string_view/literals/types.cc: Likewise. * testsuite/experimental/string_view/literals/values.cc: Likewise. From-SVN: r228439
This commit is contained in:
parent
8b75621078
commit
1ca9de5126
@ -1,5 +1,14 @@
|
||||
2015-10-03 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* testsuite/21_strings/basic_string/literals/types.cc: Guard use of
|
||||
wchar_t with _GLIBCXX_USE_WCHAR_T.
|
||||
* testsuite/21_strings/basic_string/literals/values.cc: Likewise.
|
||||
* testsuite/21_strings/basic_string/requirements/citerators.cc:
|
||||
Likewise.
|
||||
* testsuite/22_locale/messages/13631.cc: Likewise.
|
||||
* testsuite/experimental/string_view/literals/types.cc: Likewise.
|
||||
* testsuite/experimental/string_view/literals/values.cc: Likewise.
|
||||
|
||||
* src/filesystem/Makefile.am: Add cxx11_abi_sources.
|
||||
* src/filesystem/Makefile.in: Regenerate.
|
||||
* src/filesystem/cow-dir.cc: New.
|
||||
|
@ -32,8 +32,10 @@ test01()
|
||||
static_assert(std::is_same<decltype(u8"Hello"s), std::string>::value,
|
||||
"u8\"Hello\"s is std::string");
|
||||
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
static_assert(std::is_same<decltype(L"Hello"s), std::wstring>::value,
|
||||
"L\"Hello\"s is std::wstring");
|
||||
#endif
|
||||
|
||||
static_assert(std::is_same<decltype(u"Hello"s), std::u16string>::value,
|
||||
"u\"Hello\"s is std::u16string");
|
||||
|
@ -27,15 +27,19 @@ test01()
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
std::string planet = "Mercury"s;
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
std::wstring wplanet = L"Venus"s;
|
||||
#endif
|
||||
std::string u8planet = u8"Mars"s;
|
||||
std::u16string u16planet = u"Juiter"s;
|
||||
std::u16string u16planet = u"Jupiter"s;
|
||||
std::u32string u32planet = U"Saturn"s;
|
||||
|
||||
VERIFY( planet == std::string("Mercury") );
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
VERIFY( wplanet == std::wstring(L"Venus") );
|
||||
#endif
|
||||
VERIFY( u8planet == std::string(u8"Mars") );
|
||||
VERIFY( u16planet == std::u16string(u"Juiter") );
|
||||
VERIFY( u16planet == std::u16string(u"Jupiter") );
|
||||
VERIFY( u32planet == std::u32string(U"Saturn") );
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
int main()
|
||||
{
|
||||
__gnu_test::citerator<std::string> test1;
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
__gnu_test::citerator<std::wstring> test2;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ void test01()
|
||||
|
||||
void test02()
|
||||
{
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
// This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
|
||||
@ -89,6 +90,7 @@ void test02()
|
||||
msgs_facet.close(msgs);
|
||||
|
||||
VERIFY( translation1 == translation2 );
|
||||
#endif
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -32,8 +32,10 @@ test01()
|
||||
static_assert(std::is_same<decltype(u8"Hello"sv), std::experimental::string_view>::value,
|
||||
"u8\"Hello\"s is std::string_view");
|
||||
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
static_assert(std::is_same<decltype(L"Hello"sv), std::experimental::wstring_view>::value,
|
||||
"L\"Hello\"s is std::wstring_view");
|
||||
#endif
|
||||
|
||||
static_assert(std::is_same<decltype(u"Hello"sv), std::experimental::u16string_view>::value,
|
||||
"u\"Hello\"s is std::u16string_view");
|
||||
|
@ -27,15 +27,19 @@ test01()
|
||||
using namespace std::experimental::literals::string_view_literals;
|
||||
|
||||
std::experimental::string_view planet = "Mercury"sv;
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
std::experimental::wstring_view wplanet = L"Venus"sv;
|
||||
#endif
|
||||
std::experimental::string_view u8planet = u8"Mars"sv;
|
||||
std::experimental::u16string_view u16planet = u"Juiter"sv;
|
||||
std::experimental::u16string_view u16planet = u"Jupiter"sv;
|
||||
std::experimental::u32string_view u32planet = U"Saturn"sv;
|
||||
|
||||
VERIFY( planet == std::experimental::string_view("Mercury") );
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
VERIFY( wplanet == std::experimental::wstring_view(L"Venus") );
|
||||
#endif
|
||||
VERIFY( u8planet == std::experimental::string_view(u8"Mars") );
|
||||
VERIFY( u16planet == std::experimental::u16string_view(u"Juiter") );
|
||||
VERIFY( u16planet == std::experimental::u16string_view(u"Jupiter") );
|
||||
VERIFY( u32planet == std::experimental::u32string_view(U"Saturn") );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user