1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // REQUIRES: locale.en_US.UTF-8
11 // REQUIRES: locale.fr_FR.UTF-8
15 // template <class charT> class numpunct_byname;
17 // string grouping() const;
22 #include "test_macros.h"
23 #include "platform_support.h" // locale name macros
31 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
32 assert(np.grouping() == "");
36 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
37 assert(np.grouping() == "");
41 std::locale l(LOCALE_en_US_UTF_8);
44 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
45 assert(np.grouping() == "\3\3");
49 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
50 assert(np.grouping() == "\3\3");
54 std::locale l(LOCALE_fr_FR_UTF_8);
55 #if defined(TEST_HAS_GLIBC)
56 const char* const group = "\3";
58 const char* const group = "\x7f";
62 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
63 assert(np.grouping() == group);
67 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
68 assert(np.grouping() == group);