]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 19_diagnostics / system_error / what-big.cc
CommitLineData
d9e48a06 1// { dg-options "-std=gnu++11" }
0bb81a93 2
5624e564 3// Copyright (C) 2007-2015 Free Software Foundation, Inc.
0bb81a93
BK
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
748086b7 8// Free Software Foundation; either version 3, or (at your option)
0bb81a93
BK
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License along
748086b7
JJ
17// with this library; see the file COPYING3. If not see
18// <http://www.gnu.org/licenses/>.
0bb81a93 19
0646d8a3
BK
20#include <string>
21#include <system_error>
22#include <testsuite_hooks.h>
0bb81a93 23
0646d8a3
BK
24// Can construct and return 10k character error string.
25void test01()
0bb81a93 26{
0646d8a3
BK
27 typedef std::system_error test_type;
28
29 bool test __attribute__((unused)) = true;
30 const std::string xxx(10000, 'x');
70593ad2 31 test_type t(std::error_code(), xxx);
b5fbd147 32 VERIFY( std::string(t.what()).find(xxx) != std::string::npos );
0646d8a3
BK
33}
34
35int main(void)
36{
37 test01();
0bb81a93
BK
38 return 0;
39}