1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // REQUIRES: locale.en_US.UTF-8
10 // REQUIRES: locale.fr_FR.UTF-8
14 // template <class charT, class traits = char_traits<charT> >
15 // class basic_streambuf;
17 // locale pubimbue(const locale& loc);
18 // locale getloc() const;
23 #include "test_macros.h"
24 #include "platform_support.h" // locale name macros
26 template <class CharT
>
28 : public std::basic_streambuf
<CharT
>
32 void imbue(const std::locale
&)
34 assert(this->getloc().name() == LOCALE_en_US_UTF_8
);
42 assert(t
.getloc().name() == "C");
44 std::locale::global(std::locale(LOCALE_en_US_UTF_8
));
47 assert(t
.getloc().name() == LOCALE_en_US_UTF_8
);
48 assert(t
.pubimbue(std::locale(LOCALE_fr_FR_UTF_8
)).name() ==
50 assert(t
.getloc().name() == LOCALE_fr_FR_UTF_8
);