1 // { dg-require-namedlocale "" }
3 // 2001-01-17 Benjamin Kosnik <bkoz@redhat.com>
5 // Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 2, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING. If not, write to the Free
20 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 // 22.2.3.1.1 nunpunct members
26 #include <testsuite_hooks.h>
32 bool test
__attribute__((unused
)) = true;
35 locale loc_c
= locale::classic();
36 locale loc_us
= locale("en_US");
37 locale loc_fr
= locale("fr_FR");
38 locale loc_de
= locale("de_DE");
39 VERIFY( loc_c
!= loc_de
);
40 VERIFY( loc_us
!= loc_fr
);
41 VERIFY( loc_us
!= loc_de
);
42 VERIFY( loc_de
!= loc_fr
);
44 // cache the numpunct facets
45 const numpunct
<char>& nump_c
= use_facet
<numpunct
<char> >(loc_c
);
46 const numpunct
<char>& nump_us
= use_facet
<numpunct
<char> >(loc_us
);
47 const numpunct
<char>& nump_fr
= use_facet
<numpunct
<char> >(loc_fr
);
48 const numpunct
<char>& nump_de
= use_facet
<numpunct
<char> >(loc_de
);
50 // sanity check the data is correct.
51 string g1
= nump_c
.grouping();
52 string t1
= nump_c
.truename();
53 string f1
= nump_c
.falsename();
55 char dp2
= nump_us
.decimal_point();
56 char th2
= nump_us
.thousands_sep();
57 string g2
= nump_us
.grouping();
58 string t2
= nump_us
.truename();
59 string f2
= nump_us
.falsename();
61 char dp3
= nump_fr
.decimal_point();
62 char th3
= nump_fr
.thousands_sep();
63 string g3
= nump_fr
.grouping();
64 string t3
= nump_fr
.truename();
65 string f3
= nump_fr
.falsename();
67 char dp4
= nump_de
.decimal_point();
68 char th4
= nump_de
.thousands_sep();
69 string g4
= nump_de
.grouping();
70 string t4
= nump_de
.truename();
71 string f4
= nump_de
.falsename();
78 // XXX This isn't actually supported right now.
79 // VERIFY( t2 != t3 );
80 // VERIFY( f2 != f3 );