Update status of filesystem issues, and add tests for LWG issue 2683

llvm-svn: 273051
This commit is contained in:
Eric Fiselier 2016-06-17 21:24:11 +00:00
parent 8885910f8e
commit 5e1787a9ea
2 changed files with 22 additions and 22 deletions

View File

@ -112,26 +112,26 @@ TEST_CASE(from_is_symlink)
const path dne = env.make_env_path("dne");
{ // skip symlinks
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(symlink, dne, copy_options::skip_symlinks, ec);
TEST_CHECK(!ec);
TEST_CHECK(!exists(dne));
}
{
const path dest = env.make_env_path("dest");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(symlink, dest, copy_options::copy_symlinks, ec);
TEST_CHECK(!ec);
TEST_CHECK(exists(dest));
TEST_CHECK(is_symlink(dest));
}
{ // copy symlink but target exists
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(symlink, file, copy_options::copy_symlinks, ec);
TEST_CHECK(ec);
}
{ // create symlinks but target exists
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(symlink, file, copy_options::create_symlinks, ec);
TEST_CHECK(ec);
}
@ -144,14 +144,14 @@ TEST_CASE(from_is_regular_file)
const path dir = env.create_dir("dir");
{ // skip copy because of directory
const path dest = env.make_env_path("dest1");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(file, dest, CO::directories_only, ec);
TEST_CHECK(!ec);
TEST_CHECK(!exists(dest));
}
{ // create symlink to file
const path dest = env.make_env_path("sym");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(file, dest, CO::create_symlinks, ec);
TEST_CHECK(!ec);
TEST_CHECK(is_symlink(dest));
@ -160,7 +160,7 @@ TEST_CASE(from_is_regular_file)
{ // create hard link to file
const path dest = env.make_env_path("hardlink");
TEST_CHECK(hard_link_count(file) == 1);
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(file, dest, CO::create_hard_links, ec);
TEST_CHECK(!ec);
TEST_CHECK(exists(dest));
@ -169,14 +169,14 @@ TEST_CASE(from_is_regular_file)
{ // is_directory(t)
const path dest_dir = env.create_dir("dest_dir");
const path expect_dest = dest_dir / file.filename();
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(file, dest_dir, ec);
TEST_CHECK(!ec);
TEST_CHECK(is_regular_file(expect_dest));
}
{ // otherwise copy_file(from, to, ...)
const path dest = env.make_env_path("file_copy");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(file, dest, ec);
TEST_CHECK(!ec);
TEST_CHECK(is_regular_file(dest));
@ -203,9 +203,9 @@ TEST_CASE(from_is_directory)
env.create_file(dir / FI.filename, FI.size);
env.create_file(nested_dir / FI.filename, FI.size);
}
{ // test for non-existant directory
{ // test for non-existent directory
const path dest = env.make_env_path("dest_dir1");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(dir, dest, ec);
TEST_REQUIRE(!ec);
TEST_CHECK(is_directory(dest));
@ -218,7 +218,7 @@ TEST_CASE(from_is_directory)
}
{ // test for existing directory
const path dest = env.create_dir("dest_dir2");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(dir, dest, ec);
TEST_REQUIRE(!ec);
TEST_CHECK(is_directory(dest));
@ -231,7 +231,7 @@ TEST_CASE(from_is_directory)
}
{ // test recursive copy
const path dest = env.make_env_path("dest_dir3");
std::error_code ec;
std::error_code ec = GetTestEC();
fs::copy(dir, dest, CO::recursive, ec);
TEST_REQUIRE(!ec);
TEST_CHECK(is_directory(dest));

View File

@ -114,20 +114,20 @@
<li>2555 - Wording clarification; no code change needed.</li>
<li>2573 - </li>
<li>2596 - Turns out we do this already. Needs tests, though.</li>
<li>2667 - </li>
<li>2669 - </li>
<li>2670 - </li>
<li>2671 - </li>
<li>2673 - </li>
<li>2674 - </li>
<li>2683 - </li>
<li>2667 - Wording clarification; no code change needed.</li>
<li>2669 - Wording clarification; no code change needed.</li>
<li>2670 - Wording clarification; no code change needed.</li>
<li>2671 - Wording clarification; no code change needed.</li>
<li>2673 - Wording clarification; no code change needed.</li>
<li>2674 - We already depend on the requirements being relaxed.</li>
<li>2683 - We already do this.</li>
<li>2684 - We already have one; just need to add a test for it.</li>
<li>2685 - Wording clarification; no code change needed. We don't handle throwing move ctors here anyway.</li>
<li>2688 - I believe that we already do this. Add more tests</li>
<li>2689 - We don't have a parallel implementation yet (though I'm working on it).</li>
<li>2698 - Wording clarification; no code change needed.</li>
<li>2706 - </li>
<li>2707 - </li>
<li>2706 - We already implement the new pop(error_code&) overloads</li>
<li>2707 - We already implement the new overloads.</li>
<li>2710 - Wording cleanup; no code change needed.</li>
</ul>