• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // REQUIRES: locale.en_US.UTF-8
11 
12 // <locale>
13 
14 // basic_string<char> name() const;
15 
16 #include <locale>
17 #include <cassert>
18 
19 #include "platform_support.h" // locale name macros
20 
main()21 int main()
22 {
23     {
24         std::locale loc;
25         assert(loc.name() == "C");
26     }
27     {
28         std::locale loc(LOCALE_en_US_UTF_8);
29         assert(loc.name() == LOCALE_en_US_UTF_8);
30     }
31 }
32