diff options
Diffstat (limited to 'libcxx/test/std/diagnostics')
| -rw-r--r-- | libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp (renamed from libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp) | 11 | ||||
| -rw-r--r-- | libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp (renamed from libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp) | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp index b58f5c55b64..a2515a4c835 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp @@ -7,6 +7,17 @@ // //===----------------------------------------------------------------------===// +// <system_error> +// class error_code + +// Make sure that the error_code bits of <system_error> are self-contained. + +#include <system_error> + int main() { + std::error_code x; + (void) x.category(); // returns a std::error_category & + (void) x.default_error_condition(); // std::error_condition + (void) x.message(); // returns a std::string } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp index b58f5c55b64..5bbca295f6b 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp @@ -7,6 +7,16 @@ // //===----------------------------------------------------------------------===// +// <system_error> +// class error_condition + +// Make sure that the error_condition bits of <system_error> are self-contained. + +#include <system_error> + int main() { + std::error_condition x = std::errc(0); + (void) x.category(); // returns a std::error_condition & + (void) x.message(); // returns a std::string } |

