]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/28_regex/traits/char/translate.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 28_regex / traits / char / translate.cc
1 // { dg_do run }
2 // { dg-do run { target c++11 } }
3 // { dg-timeout-factor 2 }
4
5 //
6 // 2010-02-17 Stephen M. Webb <stephen.webb@bregmasoft.ca>
7 //
8 // Copyright (C) 2010-2024 Free Software Foundation, Inc.
9 //
10 // This file is part of the GNU ISO C++ Library. This library is free
11 // software; you can redistribute it and/or modify it under the
12 // terms of the GNU General Public License as published by the
13 // Free Software Foundation; either version 3, or (at your option)
14 // any later version.
15 //
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License along
22 // with this library; see the file COPYING3. If not see
23 // <http://www.gnu.org/licenses/>.
24
25 // 28.3 Requirements [re.req]
26 // 28.2 (4) Table 127 - Regular expression traits class requirements
27 // 28.7 Class template regex_traits [re.traits]
28 // 28.7 (3) static std::size_t length(const char_type* p);
29
30 #include <regex>
31 #include <testsuite_hooks.h>
32
33 void
34 test01()
35 {
36 typedef char CharT;
37
38 std::regex_traits<CharT> t;
39 CharT c = 'a';
40 CharT d = 'a';
41
42 VERIFY( t.translate(c) == t.translate(d) );
43 }
44
45 int main()
46 {
47 test01();
48 return 0;
49 }