]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/util/testsuite_error.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / util / testsuite_error.h
CommitLineData
70593ad2 1// -*- C++ -*-
f92ab29f 2// Error handling utils for the C++ library testsuite.
70593ad2 3//
99dee823 4// Copyright (C) 2007-2021 Free Software Foundation, Inc.
70593ad2
BK
5//
6// This file is part of the GNU ISO C++ Library. This library is free
7// software; you can redistribute it and/or modify it under the
8// terms of the GNU General Public License as published by the
748086b7 9// Free Software Foundation; either version 3, or (at your option)
70593ad2
BK
10// any later version.
11//
12// This library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License along
748086b7
JJ
18// with this library; see the file COPYING3. If not see
19// <http://www.gnu.org/licenses/>.
70593ad2 20//
70593ad2 21
4661c8fd 22#include <string>
70593ad2
BK
23#include <testsuite_hooks.h>
24
25#ifndef _TESTSUITE_ERROR_H
26#define _TESTSUITE_ERROR_H 1
27
28namespace __gnu_test
29{
70593ad2 30 struct test_category : public std::error_category
f92ab29f 31 {
70593ad2 32 virtual const char*
cd88bb8c
PC
33 name() const noexcept
34 {
70593ad2
BK
35 const char* s = "__gnu_test::test_category";
36 return s;
37 }
38
f92ab29f 39 virtual std::string
70593ad2 40 message(int) const
4661c8fd 41 { return std::string("message to be determined"); }
70593ad2
BK
42 };
43
44 struct test_derived_category : public test_category
f92ab29f 45 {
70593ad2 46 virtual const char*
cd88bb8c
PC
47 name() const noexcept
48 {
70593ad2
BK
49 const char* s = "__gnu_test::test_derived_category";
50 return s;
51 }
52 };
53
54}
55#endif