On 09/05/16 11:09 +0100, Jonathan Wakely wrote:
This fixes some uninitialized members in the
filesystem::recursive_directory_iterator default constructor.

Tested x86_64-linux, committed to trunk. Backports to follow soon.

Oops, I think I need more caffeine. The new function I added to the
test wasn't called, but would have crashed if it was.

Tested again x86_64-linux, committed to trunk.


commit d0bf5c26f645baf1f568466d5bd48021293a806a
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Mon May 9 12:30:51 2016 +0100

    libstdc++/71004 fix recent additions to testcase
    
    	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.

diff --git a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
index a263602..b5f71be 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
@@ -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();
 }

Reply via email to