* testsuite/26_numerics/complex/dr2714.cc: Move to ...
* testsuite/26_numerics/complex/inserters_extractors/char/dr2714.cc:
... Here. Remove duplicate header and dg-options. Check first invalid
character gets putback. Remove wchar_t test.
From-SVN: r255630
+2017-12-14 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/26_numerics/complex/dr2714.cc: Move to ...
+ * testsuite/26_numerics/complex/inserters_extractors/char/dr2714.cc:
+ ... Here. Remove duplicate header and dg-options. Check first invalid
+ character gets putback. Remove wchar_t test.
+
2017-12-13 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/59568
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++98" }
-
#include <complex>
#include <sstream>
-#include <complex>
#include <testsuite_hooks.h>
void
void
test02()
-{
- std::wistringstream in(L" ( 2.0 , 0.5 ) ");
- std::complex<double> c;
- in >> c;
- VERIFY( in.good() );
- VERIFY( c.real() == 2.0 && c.imag() == 0.5 );
-}
-
-void
-test03()
{
std::istringstream in;
std::complex<double> c(-1, -1);
in >> c;
VERIFY( in.fail() );
in.clear();
+ VERIFY( in.get() == 'a' );
in.str(" ( ) ");
in >> c;
in.str("(b)");
in >> c;
VERIFY( in.fail() );
-
in.clear();
VERIFY( in.get() == 'b' );
- in.str("( c)");
+ in.str("( c)");
in >> c;
VERIFY( in.fail() );
in.clear();
}
void
-test04()
+test03()
{
// PR libstdc++/59568
std::istringstream in;
test01();
test02();
test03();
- test04();
}