diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-06-17 21:24:11 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-06-17 21:24:11 +0000 |
commit | 5e1787a9eafd1d3595a53bf2e5aede9f614d0d97 (patch) | |
tree | 9a7749ee171e32bee6537f4c0127f4861a0c71c7 /libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy | |
parent | 8885910f8ef26a662493531be3e50d343564594e (diff) | |
download | bcm5719-llvm-5e1787a9eafd1d3595a53bf2e5aede9f614d0d97.tar.gz bcm5719-llvm-5e1787a9eafd1d3595a53bf2e5aede9f614d0d97.zip |
Update status of filesystem issues, and add tests for LWG issue 2683
llvm-svn: 273051
Diffstat (limited to 'libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy')
-rw-r--r-- | libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp index 8e55aec3489..7d318719f74 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp @@ -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)); |