diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-07-12 14:40:19 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-07-12 21:04:13 +0100 |
commit | d6384ad1a9ab7ea46990a7ed1299d5a2be4acece (patch) | |
tree | e2c6615fb5de5079ec5afdf94c01edbeb951e53e /libstdc++-v3/testsuite/experimental/filesystem | |
parent | 61fe96d4853eb743eebbf98bff24f96fe007a6e1 (diff) | |
download | gcc-d6384ad1a9ab7ea46990a7ed1299d5a2be4acece.zip gcc-d6384ad1a9ab7ea46990a7ed1299d5a2be4acece.tar.gz gcc-d6384ad1a9ab7ea46990a7ed1299d5a2be4acece.tar.bz2 |
libstdc++: Check conversion from filesystem::path to wide strings [PR95048]
The testcase added for this bug only checks conversion from wide strings
on construction, but the fix also covered conversion to wide stings via
path::wstring(). Add checks for that, and u16string() and u32string().
libstdc++-v3/ChangeLog:
PR libstdc++/95048
* testsuite/27_io/filesystem/path/construct/95048.cc: Check
conversions to wide strings.
* testsuite/experimental/filesystem/path/construct/95048.cc:
Likewise.
Diffstat (limited to 'libstdc++-v3/testsuite/experimental/filesystem')
-rw-r--r-- | libstdc++-v3/testsuite/experimental/filesystem/path/construct/95048.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/95048.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/95048.cc index b7a93f3..fc65bfe 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/95048.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/95048.cc @@ -18,6 +18,8 @@ test_wide() VERIFY( CHECK(L, "\U0001F4C1") ); // folder VERIFY( CHECK(L, "\U0001F4C2") ); // open folder VERIFY( CHECK(L, "\U0001F4C4") ); // filing cabient + + VERIFY( path(u8"\U0001D11E").wstring() == L"\U0001D11E" ); // G Clef } void @@ -27,6 +29,8 @@ test_u16() VERIFY( CHECK(u, "\U0001F4C1") ); // folder VERIFY( CHECK(u, "\U0001F4C2") ); // open folder VERIFY( CHECK(u, "\U0001F4C4") ); // filing cabient + + VERIFY( path(u8"\U0001D11E").u16string() == u"\U0001D11E" ); // G Clef } void @@ -36,6 +40,8 @@ test_u32() VERIFY( CHECK(U, "\U0001F4C1") ); // folder VERIFY( CHECK(U, "\U0001F4C2") ); // open folder VERIFY( CHECK(U, "\U0001F4C4") ); // filing cabient + + VERIFY( path(u8"\U0001D11E").u32string() == U"\U0001D11E" ); // G Clef } int |