2020-03-05 Jonathan Wakely <jwakely@redhat.com>
+ * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
+ * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
+ * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
+ * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
+ for return value, and in comparison.
+ * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
+
PR libstdc++/94051
* include/std/string_view: Include <bits/ostream_insert.h>.
* testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
const std::filesystem::perm_options permopts{};
std::filesystem::space_info sp;
std::error_code ec;
- bool b;
+ bool b [[maybe_unused]];
std::uintmax_t size;
std::filesystem::absolute(p);
VERIFY( !exists(to) );
ec.clear();
- opts != fs::copy_options::recursive;
+ opts |= fs::copy_options::recursive;
fs::copy("/", to, opts, ec);
VERIFY( ec == std::make_error_code(std::errc::is_a_directory) );
VERIFY( !exists(to) );
test01()
{
std::error_code ec;
- size_t size = fs::file_size(".", ec);
+ auto size = fs::file_size(".", ec);
VERIFY( ec == std::errc::is_a_directory );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
try {
size = fs::file_size(".");
ec = e.code();
}
VERIFY( ec == std::errc::is_a_directory );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
}
void
fs::path p = __gnu_test::nonexistent_path();
std::error_code ec;
- size_t size = fs::file_size(p, ec);
+ auto size = fs::file_size(p, ec);
VERIFY( ec );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
try {
size = fs::file_size(p);
ec = e.code();
}
VERIFY( ec );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
}
int
VERIFY( !exists(to) );
ec.clear();
- opts != fs::copy_options::recursive;
+ opts |= fs::copy_options::recursive;
fs::copy("/", to, opts, ec);
VERIFY( ec == std::make_error_code(std::errc::is_a_directory) );
VERIFY( !exists(to) );
test01()
{
std::error_code ec;
- size_t size = fs::file_size(".", ec);
+ auto size = fs::file_size(".", ec);
VERIFY( ec == std::errc::is_a_directory );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
try {
size = fs::file_size(".");
ec = e.code();
}
VERIFY( ec == std::errc::is_a_directory );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
}
void
fs::path p = __gnu_test::nonexistent_path();
std::error_code ec;
- size_t size = fs::file_size(p, ec);
+ auto size = fs::file_size(p, ec);
VERIFY( ec );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
try {
size = fs::file_size(p);
ec = e.code();
}
VERIFY( ec );
- VERIFY( size == -1 );
+ VERIFY( size == (std::uintmax_t)-1 );
}
int