From: Jonathan Wakely Date: Thu, 14 Dec 2017 11:28:41 +0000 (+0000) Subject: Improve std::complex test and move to sub-directory X-Git-Tag: basepoints/gcc-9~2688 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=02aee327674dae6359d7b1e1a7434f039ba0c3d3;p=gcc.git Improve std::complex test and move to sub-directory * 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e4e435dccee1..b20a277a0856 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2017-12-14 Jonathan Wakely + + * 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 PR libstdc++/59568 diff --git a/libstdc++-v3/testsuite/26_numerics/complex/dr2714.cc b/libstdc++-v3/testsuite/26_numerics/complex/inserters_extractors/char/dr2714.cc similarity index 92% rename from libstdc++-v3/testsuite/26_numerics/complex/dr2714.cc rename to libstdc++-v3/testsuite/26_numerics/complex/inserters_extractors/char/dr2714.cc index 6b35e8adcf91..17fb8a249d95 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex/dr2714.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex/inserters_extractors/char/dr2714.cc @@ -15,11 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++98" } - #include #include -#include #include void @@ -36,16 +33,6 @@ test01() void test02() -{ - std::wistringstream in(L" ( 2.0 , 0.5 ) "); - std::complex c; - in >> c; - VERIFY( in.good() ); - VERIFY( c.real() == 2.0 && c.imag() == 0.5 ); -} - -void -test03() { std::istringstream in; std::complex c(-1, -1); @@ -55,6 +42,7 @@ test03() in >> c; VERIFY( in.fail() ); in.clear(); + VERIFY( in.get() == 'a' ); in.str(" ( ) "); in >> c; @@ -71,11 +59,10 @@ test03() 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(); @@ -121,7 +108,7 @@ test03() } void -test04() +test03() { // PR libstdc++/59568 std::istringstream in; @@ -164,5 +151,4 @@ main() test01(); test02(); test03(); - test04(); }