[libcxx] r337764 - Fix accidentally removed test.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 23 15:39:56 PDT 2018
Author: ericwf
Date: Mon Jul 23 15:39:56 2018
New Revision: 337764
URL: http://llvm.org/viewvc/llvm-project?rev=337764&view=rev
Log:
Fix accidentally removed test.
When adding the new tests for the filesystem_error::what method,
I incorrectly removed a test case and replaced it with something else.
This patch restores that test case
Modified:
libcxx/trunk/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
Modified: libcxx/trunk/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp?rev=337764&r1=337763&r2=337764&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp Mon Jul 23 15:39:56 2018
@@ -25,8 +25,6 @@
#include "rapid-cxx-test.hpp"
#include "filesystem_test_helper.hpp"
-#include <iostream>
-
using namespace fs;
TEST_SUITE(recursive_directory_iterator_increment_tests)
@@ -292,6 +290,21 @@ TEST_CASE(test_PR35078)
}
{
bool SeenNestedFile = false;
+ recursive_directory_iterator it = SetupState(true, SeenNestedFile);
+ TEST_REQUIRE(it != endIt);
+ TEST_REQUIRE(*it == nestedDir);
+ ec = GetTestEC();
+ it.increment(ec);
+ TEST_CHECK(!ec);
+ if (SeenNestedFile) {
+ TEST_CHECK(it == endIt);
+ } else {
+ TEST_REQUIRE(it != endIt);
+ TEST_CHECK(*it == nestedFile);
+ }
+ }
+ {
+ bool SeenNestedFile = false;
recursive_directory_iterator it = SetupState(false, SeenNestedFile);
TEST_REQUIRE(it != endIt);
TEST_REQUIRE(*it == nestedDir);
More information about the cfe-commits
mailing list