libstdc++/71004 fix recent additions to testcase
authorJonathan Wakely <jwakely@redhat.com>
Mon, 9 May 2016 11:50:01 +0000 (12:50 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 9 May 2016 11:50:01 +0000 (12:50 +0100)
PR libstdc++/71004
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: Fix test02 to not call member
functions on invalid iterator, and use VERIFY not assert.

From-SVN: r236028

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc

index 6f4ae5f49502d8742998190e64cddbc333edb45b..1cdb7f4e911816b9293030703276c57058cd7179 100644 (file)
@@ -1,3 +1,10 @@
+2016-05-09  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/71004
+       * testsuite/experimental/filesystem/iterators/
+       recursive_directory_iterator.cc: Fix test02 to not call member
+       functions on invalid iterator, and use VERIFY not assert.
+
 2016-05-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
 
        Avoid endless run-time recursion for copying single-element
index a2636029f423c2c5ba9cf819502f00e458e7376e..b5f71be653dbce535c34556a03164cd363e87968 100644 (file)
@@ -100,15 +100,16 @@ test01()
 void
 test02()
 {
+  bool test __attribute__((unused)) = false;
+
   // libstdc++71004
   const fs::recursive_directory_iterator it;
-  assert( it.options() == fs::directory_options{} );
-  assert( it.depth() == 0 );
-  assert(it.recursion_pending() == false);
+  VERIFY( it == fs::recursive_directory_iterator() );
 }
 
 int
 main()
 {
   test01();
+  test02();
 }