]> gcc.gnu.org Git - gcc.git/commitdiff
Improve std::complex test and move to sub-directory
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Dec 2017 11:28:41 +0000 (11:28 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 14 Dec 2017 11:28:41 +0000 (11:28 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/26_numerics/complex/inserters_extractors/char/dr2714.cc [moved from libstdc++-v3/testsuite/26_numerics/complex/dr2714.cc with 92% similarity]

index e4e435dccee18c592f40ff3f44a3fbfddef080dc..b20a277a0856bed275d0f40cb01903af2bc0a463 100644 (file)
@@ -1,3 +1,10 @@
+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
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 6b35e8adcf91f8302954f6d636d5e335aa4b9160..17fb8a249d95a0d1a832d5ef08aa3982d7bca259 100644 (file)
 // 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
@@ -36,16 +33,6 @@ test01()
 
 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);
@@ -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();
 }
This page took 0.065576 seconds and 5 git commands to generate.