]>
Commit | Line | Data |
---|---|---|
92010a79 CF |
1 | // { dg-options "-std=gnu++0x" } |
2 | // { dg-do compile } | |
3 | ||
aa118a03 | 4 | // Copyright (C) 2007-2014 Free Software Foundation, Inc. |
92010a79 CF |
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) |
92010a79 CF |
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/>. | |
92010a79 CF |
20 | |
21 | #include <system_error> | |
22 | ||
23 | #define TEST_ERRC(x) errc x(errc::x); (void)x | |
24 | ||
25 | void test01() | |
26 | { | |
27 | using std::errc; | |
28 | ||
29 | TEST_ERRC(address_family_not_supported); | |
30 | TEST_ERRC(address_in_use); | |
31 | TEST_ERRC(address_not_available); | |
32 | TEST_ERRC(already_connected); | |
33 | TEST_ERRC(argument_list_too_long); | |
34 | TEST_ERRC(argument_out_of_domain); | |
35 | TEST_ERRC(bad_address); | |
36 | TEST_ERRC(bad_file_descriptor); | |
37 | ||
38 | #ifdef _GLIBCXX_HAVE_EBADMSG | |
39 | TEST_ERRC(bad_message); | |
40 | #endif | |
41 | ||
42 | TEST_ERRC(broken_pipe); | |
43 | TEST_ERRC(connection_aborted); | |
44 | TEST_ERRC(connection_already_in_progress); | |
45 | TEST_ERRC(connection_refused); | |
46 | TEST_ERRC(connection_reset); | |
47 | TEST_ERRC(cross_device_link); | |
48 | TEST_ERRC(destination_address_required); | |
49 | TEST_ERRC(device_or_resource_busy); | |
50 | TEST_ERRC(directory_not_empty); | |
51 | TEST_ERRC(executable_format_error); | |
52 | TEST_ERRC(file_exists); | |
53 | TEST_ERRC(file_too_large); | |
54 | TEST_ERRC(filename_too_long); | |
55 | TEST_ERRC(function_not_supported); | |
56 | TEST_ERRC(host_unreachable); | |
57 | ||
58 | #ifdef _GLIBCXX_HAVE_EIDRM | |
59 | TEST_ERRC(identifier_removed); | |
60 | #endif | |
61 | ||
62 | TEST_ERRC(illegal_byte_sequence); | |
63 | TEST_ERRC(inappropriate_io_control_operation); | |
64 | TEST_ERRC(interrupted); | |
65 | TEST_ERRC(invalid_argument); | |
66 | TEST_ERRC(invalid_seek); | |
67 | TEST_ERRC(io_error); | |
68 | TEST_ERRC(is_a_directory); | |
69 | TEST_ERRC(message_size); | |
70 | TEST_ERRC(network_down); | |
71 | TEST_ERRC(network_reset); | |
72 | TEST_ERRC(network_unreachable); | |
73 | TEST_ERRC(no_buffer_space); | |
74 | TEST_ERRC(no_child_process); | |
75 | ||
76 | #ifdef _GLIBCXX_HAVE_ENOLINK | |
77 | TEST_ERRC(no_link); | |
78 | #endif | |
79 | ||
80 | TEST_ERRC(no_lock_available); | |
81 | ||
82 | #ifdef _GLIBCXX_HAVE_ENODATA | |
83 | TEST_ERRC(no_message_available); | |
84 | #endif | |
85 | ||
86 | TEST_ERRC(no_message); | |
92010a79 CF |
87 | TEST_ERRC(no_protocol_option); |
88 | TEST_ERRC(no_space_on_device); | |
89 | ||
90 | #ifdef _GLIBCXX_HAVE_ENOSR | |
91 | TEST_ERRC(no_stream_resources); | |
92 | #endif | |
93 | ||
94 | TEST_ERRC(no_such_device_or_address); | |
95 | TEST_ERRC(no_such_device); | |
96 | TEST_ERRC(no_such_file_or_directory); | |
97 | TEST_ERRC(no_such_process); | |
98 | TEST_ERRC(not_a_directory); | |
99 | TEST_ERRC(not_a_socket); | |
100 | ||
101 | #ifdef _GLIBCXX_HAVE_ENOSTR | |
102 | TEST_ERRC(not_a_stream); | |
103 | #endif | |
104 | ||
105 | TEST_ERRC(not_connected); | |
106 | TEST_ERRC(not_enough_memory); | |
107 | TEST_ERRC(not_supported); | |
108 | ||
109 | #ifdef _GLIBCXX_HAVE_ECANCELED | |
110 | TEST_ERRC(operation_canceled); | |
111 | #endif | |
112 | ||
113 | TEST_ERRC(operation_in_progress); | |
114 | TEST_ERRC(operation_not_permitted); | |
115 | TEST_ERRC(operation_not_supported); | |
116 | TEST_ERRC(operation_would_block); | |
117 | ||
118 | #ifdef _GLIBCXX_HAVE_EOWNERDEAD | |
119 | TEST_ERRC(owner_dead); | |
120 | #endif | |
121 | ||
122 | TEST_ERRC(permission_denied); | |
123 | ||
124 | #ifdef _GLIBCXX_HAVE_EPROTO | |
125 | TEST_ERRC(protocol_error); | |
126 | #endif | |
127 | ||
128 | TEST_ERRC(protocol_not_supported); | |
129 | TEST_ERRC(read_only_file_system); | |
130 | TEST_ERRC(resource_deadlock_would_occur); | |
131 | TEST_ERRC(resource_unavailable_try_again); | |
132 | TEST_ERRC(result_out_of_range); | |
133 | ||
134 | #ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE | |
135 | TEST_ERRC(state_not_recoverable); | |
136 | #endif | |
137 | ||
138 | #ifdef _GLIBCXX_HAVE_ETIME | |
139 | TEST_ERRC(stream_timeout); | |
140 | #endif | |
141 | ||
142 | #ifdef _GLIBCXX_HAVE_ETXTBSY | |
143 | TEST_ERRC(text_file_busy); | |
144 | #endif | |
145 | ||
146 | TEST_ERRC(timed_out); | |
147 | TEST_ERRC(too_many_files_open_in_system); | |
148 | TEST_ERRC(too_many_files_open); | |
149 | TEST_ERRC(too_many_links); | |
150 | TEST_ERRC(too_many_symbolic_link_levels); | |
151 | ||
152 | #ifdef _GLIBCXX_HAVE_EOVERFLOW | |
153 | TEST_ERRC(value_too_large); | |
154 | #endif | |
155 | ||
156 | TEST_ERRC(wrong_protocol_type); | |
157 | } |