Skip to content

Commit 092a73b

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
1 parent 5e0fc93 commit 092a73b

File tree

2 files changed

+11
-28
lines changed

2 files changed

+11
-28
lines changed

libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
// string grouping() const;
2626

27+
#include <iostream>
2728
#include <locale>
2829
#include <limits>
2930
#include <cassert>
@@ -89,27 +90,22 @@ int main(int, char**)
8990
}
9091
#endif
9192

92-
#if defined( _WIN32) || defined(_AIX)
93-
std::string us_grouping = "\3";
94-
#else
95-
std::string us_grouping = "\3\3";
96-
#endif
9793
{
9894
Fnf f(LOCALE_en_US_UTF_8, 1);
99-
assert(f.grouping() == us_grouping);
95+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
10096
}
10197
{
10298
Fnt f(LOCALE_en_US_UTF_8, 1);
103-
assert(f.grouping() == us_grouping);
99+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
104100
}
105101
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
106102
{
107103
Fwf f(LOCALE_en_US_UTF_8, 1);
108-
assert(f.grouping() == us_grouping);
104+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
109105
}
110106
{
111107
Fwt f(LOCALE_en_US_UTF_8, 1);
112-
assert(f.grouping() == us_grouping);
108+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
113109
}
114110
#endif
115111

@@ -132,27 +128,22 @@ int main(int, char**)
132128
}
133129
#endif
134130

135-
#if defined( _WIN32) || defined(_AIX)
136-
std::string ru_grouping = "\3";
137-
#else
138-
std::string ru_grouping = "\3\3";
139-
#endif
140131
{
141132
Fnf f(LOCALE_ru_RU_UTF_8, 1);
142-
assert(f.grouping() == ru_grouping);
133+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
143134
}
144135
{
145136
Fnt f(LOCALE_ru_RU_UTF_8, 1);
146-
assert(f.grouping() == ru_grouping);
137+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
147138
}
148139
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
149140
{
150141
Fwf f(LOCALE_ru_RU_UTF_8, 1);
151-
assert(f.grouping() == ru_grouping);
142+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
152143
}
153144
{
154145
Fwt f(LOCALE_ru_RU_UTF_8, 1);
155-
assert(f.grouping() == ru_grouping);
146+
assert(f.grouping() == "\3" || f.grouping() == "\3\3");
156147
}
157148
#endif
158149

libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,13 @@ int main(int, char**)
4848
{
4949
typedef char C;
5050
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
51-
#if defined(_WIN32) || defined(_AIX)
52-
assert(np.grouping() == "\3");
53-
#else
54-
assert(np.grouping() == "\3\3");
55-
#endif
51+
assert(np.grouping() == "\3" || np.grouping() == "\3\3");
5652
}
5753
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
5854
{
5955
typedef wchar_t C;
6056
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
61-
# if defined(_WIN32) || defined(_AIX)
62-
assert(np.grouping() == "\3");
63-
# else
64-
assert(np.grouping() == "\3\3");
65-
# endif
57+
assert(np.grouping() == "\3" || np.grouping() == "\3\3");
6658
}
6759
#endif
6860
}

0 commit comments

Comments
 (0)