[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / re / re.traits / default.pass.cpp
blob459f044e037a3a36ba0f4a50e83400e386bbe037
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
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
7 //
8 //===----------------------------------------------------------------------===//
10 // REQUIRES: locale.en_US.UTF-8
12 // <regex>
14 // template <class charT> struct regex_traits;
16 // regex_traits();
18 #include <regex>
19 #include <cassert>
21 #include "test_macros.h"
22 #include "platform_support.h" // locale name macros
24 int main(int, char**)
27 std::regex_traits<char> t1;
28 assert(t1.getloc().name() == "C");
29 std::regex_traits<wchar_t> t2;
30 assert(t2.getloc().name() == "C");
33 std::locale::global(std::locale(LOCALE_en_US_UTF_8));
34 std::regex_traits<char> t1;
35 assert(t1.getloc().name() == LOCALE_en_US_UTF_8);
36 std::regex_traits<wchar_t> t2;
37 assert(t2.getloc().name() == LOCALE_en_US_UTF_8);
40 return 0;