Windows porting work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
#include "../../../../platform_support.h" // locale name macros
|
||||
|
||||
template <class CharT>
|
||||
struct test_buf
|
||||
: public std::basic_filebuf<CharT>
|
||||
@@ -115,7 +117,7 @@ int main()
|
||||
std::remove("overflow.dat");
|
||||
{
|
||||
test_buf<wchar_t> f;
|
||||
f.pubimbue(std::locale("en_US.UTF-8"));
|
||||
f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
|
||||
assert(f.open("overflow.dat", std::ios_base::out) != 0);
|
||||
assert(f.sputc(0x4E51) == 0x4E51);
|
||||
assert(f.sputc(0x4E52) == 0x4E52);
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
#include "../../../../platform_support.h" // locale name macros
|
||||
|
||||
template <class CharT>
|
||||
struct test_buf
|
||||
: public std::basic_filebuf<CharT>
|
||||
@@ -108,7 +110,7 @@ int main()
|
||||
}
|
||||
{
|
||||
test_buf<wchar_t> f;
|
||||
f.pubimbue(std::locale("en_US.UTF-8"));
|
||||
f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
|
||||
assert(f.open("underflow_utf8.dat", std::ios_base::in) != 0);
|
||||
assert(f.is_open());
|
||||
assert(f.sbumpc() == 0x4E51);
|
||||
|
Reference in New Issue
Block a user