1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // NetBSD does not support LC_COLLATE at the moment
12 // REQUIRES: locale.cs_CZ.ISO8859-2
16 // template <class charT> struct regex_traits;
18 // template <class ForwardIterator>
19 // string_type transform(ForwardIterator first, ForwardIterator last) const;
23 #include "test_macros.h"
24 #include "test_iterators.h"
25 #include "platform_support.h" // locale name macros
30 std::regex_traits
<char> t
;
33 typedef forward_iterator
<const char*> F
;
34 assert(t
.transform(F(a
), F(a
+1)) > t
.transform(F(B
), F(B
+1)));
35 t
.imbue(std::locale(LOCALE_cs_CZ_ISO8859_2
));
36 assert(t
.transform(F(a
), F(a
+1)) < t
.transform(F(B
), F(B
+1)));
38 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
40 std::regex_traits
<wchar_t> t
;
41 const wchar_t a
[] = L
"a";
42 const wchar_t B
[] = L
"B";
43 typedef forward_iterator
<const wchar_t*> F
;
44 assert(t
.transform(F(a
), F(a
+1)) > t
.transform(F(B
), F(B
+1)));
45 t
.imbue(std::locale(LOCALE_cs_CZ_ISO8859_2
));
46 assert(t
.transform(F(a
), F(a
+1)) < t
.transform(F(B
), F(B
+1)));