Home | History | Annotate | Download | only in fs.op.copy_file

Lines Matching defs:ec

15 // bool copy_file(const path& from, const path& to, error_code& ec) noexcept;
18 // error_code& ec) noexcept;
40 std::error_code ec; ((void)ec);
43 ASSERT_SAME_TYPE(decltype(fs::copy_file(p, p, ec)), bool);
44 ASSERT_SAME_TYPE(decltype(fs::copy_file(p, p, opts, ec)), bool);
47 ASSERT_NOT_NOEXCEPT(fs::copy_file(p, p, ec));
48 ASSERT_NOT_NOEXCEPT(fs::copy_file(p, p, opts, ec));
53 auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
62 && err.code() == ec;
65 ((void)f); ((void)t); ((void)ec);
76 std::error_code ec;
78 ec) == false);
79 TEST_REQUIRE(ec);
80 TEST_CHECK(ec == std::make_error_code(std::errc::file_exists));
81 TEST_CHECK(checkThrow(file, file, ec));
84 std::error_code ec;
85 TEST_CHECK(fs::copy_file(file, file2, ec) == false);
86 TEST_REQUIRE(ec);
87 TEST_CHECK(ec == std::make_error_code(std::errc::file_exists));
88 TEST_CHECK(checkThrow(file, file2, ec));
99 std::error_code ec;
100 TEST_REQUIRE(fs::copy_file(file, dest, ec) == true);
101 TEST_CHECK(!ec);
106 std::error_code ec;
108 copy_options::overwrite_existing, ec) == true);
109 TEST_CHECK(!ec);
122 std::error_code ec;
123 TEST_REQUIRE(fs::copy_file(from, older, copy_options::update_existing, ec) == true);
124 TEST_CHECK(!ec);
127 TEST_REQUIRE(fs::copy_file(from, newer, copy_options::update_existing, ec) == false);
128 TEST_CHECK(!ec);
133 std::error_code ec;
134 TEST_REQUIRE(fs::copy_file(file, file2, copy_options::skip_existing, ec) == false);
135 TEST_CHECK(!ec);
148 std::error_code ec;
149 TEST_REQUIRE(fs::copy_file(file, dest, ec) == true);
150 TEST_CHECK(!ec);
160 std::error_code ec = GetTestEC();
161 TEST_CHECK(fs::copy_file(file, dest, ec) == false);
162 TEST_CHECK(ec);
163 TEST_CHECK(ec != GetTestEC());
164 ec = GetTestEC();
165 TEST_CHECK(fs::copy_file(dest, file, ec) == false);
166 TEST_CHECK(ec);
167 TEST_CHECK(ec != GetTestEC());
177 std::error_code ec = GetTestEC();
178 TEST_REQUIRE(fs::copy_file(fifo, dest, ec) == false);
179 TEST_CHECK(ec);
180 TEST_CHECK(ec != GetTestEC());
184 std::error_code ec = GetTestEC();
185 TEST_REQUIRE(fs::copy_file(file, fifo, copy_options::overwrite_existing, ec) == false);
186 TEST_CHECK(ec);
187 TEST_CHECK(ec != GetTestEC());
188 TEST_CHECK(ec == std::make_error_code(std::errc::not_supported));