From 958dc0c2248fa83b12597d3be3e60fa483ec459b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 26 Jul 2017 23:06:13 +0100 Subject: [PATCH] PR libstdc++/53984 fix failing test PR libstdc++/53984 * testsuite/27_io/basic_fstream/53984.cc: Fix test. From-SVN: r250594 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fab36e2ae22..c723b94875b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2017-07-26 Jonathan Wakely + + * testsuite/27_io/basic_fstream/53984.cc: Fix test. + 2017-07-26 Paolo Carlini * testsuite/27_io/basic_fstream/53984.cc: Fix typo in dg-require diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc index 53c77c20f92..e49d2b1ad1f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc +++ b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc @@ -23,10 +23,13 @@ void test01() { - std::fstream in("."); - int x; - in >> x; - VERIFY( in.bad() ); + std::ifstream in("."); + if (in) + { + int x; + in >> x; + VERIFY( in.bad() ); + } } int -- 2.30.2