]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/ios_base/failure/error_code.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / ios_base / failure / error_code.cc
index a377dc047c9fd8a6ebecdb695568b51fc8732498..a8904276c838b678d3167c0e10b32ff83853494b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Free Software Foundation, Inc.
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -41,8 +41,21 @@ test01()
   VERIFY( e4.code() == ec );
 }
 
+[[gnu::noinline,gnu::noipa]]
+const std::error_category&
+get_iostream_category()
+{ return std::iostream_category(); }
+
+void
+test02()
+{
+  auto ec = std::make_error_code(std::io_errc::stream);
+  VERIFY( ec.category() == get_iostream_category() );
+}
+
 int
 main()
 {
   test01();
+  test02();
 }