1 // 2001-01-17 Benjamin Kosnik <bkoz@redhat.com>
3 // Copyright (C) 2001 Free Software Foundation
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 2, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING. If not, write to the Free
18 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21 // 22.2.3.1.1 nunpunct members
24 #include <testsuite_hooks.h>
26 // XXX This test is not working for non-glibc locale models.
27 // { dg-do run { xfail *-*-* } }
37 locale loc_c = locale::classic();
40 locale loc_us("en_US");
42 VERIFY( loc_c != loc_us );
44 locale loc_fr("fr_FR");
46 VERIFY( loc_c != loc_fr );
48 locale loc_de("de_DE");
50 VERIFY( loc_c != loc_de );
52 VERIFY( loc_us != loc_fr );
53 VERIFY( loc_us != loc_de );
54 VERIFY( loc_de != loc_fr );
56 // cache the numpunct facets
57 const numpunct<char>& nump_c = use_facet<numpunct<char> >(loc_c);
58 const numpunct<char>& nump_us = use_facet<numpunct<char> >(loc_us);
59 const numpunct<char>& nump_fr = use_facet<numpunct<char> >(loc_fr);
60 const numpunct<char>& nump_de = use_facet<numpunct<char> >(loc_de);
62 // sanity check the data is correct.
63 char dp1 = nump_c.decimal_point();
64 char th1 = nump_c.thousands_sep();
65 string g1 = nump_c.grouping();
66 string t1 = nump_c.truename();
67 string f1 = nump_c.falsename();
69 char dp2 = nump_us.decimal_point();
70 char th2 = nump_us.thousands_sep();
71 string g2 = nump_us.grouping();
72 string t2 = nump_us.truename();
73 string f2 = nump_us.falsename();
75 char dp3 = nump_fr.decimal_point();
76 char th3 = nump_fr.thousands_sep();
77 string g3 = nump_fr.grouping();
78 string t3 = nump_fr.truename();
79 string f3 = nump_fr.falsename();
81 char dp4 = nump_de.decimal_point();
82 char th4 = nump_de.thousands_sep();
83 string g4 = nump_de.grouping();
84 string t4 = nump_de.truename();
85 string f4 = nump_de.falsename();
90 // XXX isn't actually supported right now.
98 // XXX isn't actually supported right now.