2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 // NetBSD does not support LC_COLLATE at the moment
13 // REQUIRES: locale.cs_CZ.ISO8859-2
17 // template <class charT> struct regex_traits;
19 // template <class ForwardIterator>
21 // transform_primary(ForwardIterator first, ForwardIterator last) const;
26 #include "test_macros.h"
27 #include "test_iterators.h"
28 #include "platform_support.h" // locale name macros
33 std::regex_traits
<char> t
;
35 const char Aacute
[] = "\xC1";
36 typedef forward_iterator
<const char*> F
;
37 assert(t
.transform_primary(F(A
), F(A
+1)) !=
38 t
.transform_primary(F(Aacute
), F(Aacute
+1)));
39 t
.imbue(std::locale(LOCALE_cs_CZ_ISO8859_2
));
40 assert(t
.transform_primary(F(A
), F(A
+1)) ==
41 t
.transform_primary(F(Aacute
), F(Aacute
+1)));
44 std::regex_traits
<wchar_t> t
;
45 const wchar_t A
[] = L
"A";
46 const wchar_t Aacute
[] = L
"\xC1";
47 typedef forward_iterator
<const wchar_t*> F
;
48 assert(t
.transform_primary(F(A
), F(A
+1)) !=
49 t
.transform_primary(F(Aacute
), F(Aacute
+1)));
50 t
.imbue(std::locale(LOCALE_cs_CZ_ISO8859_2
));
51 assert(t
.transform_primary(F(A
), F(A
+1)) ==
52 t
.transform_primary(F(Aacute
), F(Aacute
+1)));