Remove building with NOCRYPTO option
[minix.git] / external / bsd / libc++ / dist / libcxx / test / re / re.traits / length.pass.cpp
blob473c233c531e79eb708368773ed54bb89ae43396
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
11 // <regex>
13 // template <class charT> struct regex_traits;
15 // static std::size_t length(const char_type* p);
17 #include <regex>
18 #include <cassert>
20 int main()
22 assert(std::regex_traits<char>::length("") == 0);
23 assert(std::regex_traits<char>::length("1") == 1);
24 assert(std::regex_traits<char>::length("12") == 2);
25 assert(std::regex_traits<char>::length("123") == 3);
27 assert(std::regex_traits<wchar_t>::length(L"") == 0);
28 assert(std::regex_traits<wchar_t>::length(L"1") == 1);
29 assert(std::regex_traits<wchar_t>::length(L"12") == 2);
30 assert(std::regex_traits<wchar_t>::length(L"123") == 3);