summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc')
-rw-r--r--libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc
index d73ff35a539..f8a4a280537 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc
@@ -29,19 +29,20 @@ void
test01()
{
const std::error_code bad_ec = make_error_code(std::errc::invalid_argument);
+ const path root = __gnu_test::root_path();
- VERIFY( exists(path{"/"}) );
- VERIFY( exists(path{"/."}) );
+ VERIFY( exists(root) );
+ VERIFY( exists(root/".") );
VERIFY( exists(path{"."}) );
VERIFY( exists(path{".."}) );
VERIFY( exists(std::filesystem::current_path()) );
std::error_code ec;
ec = bad_ec;
- VERIFY( exists(path{"/"}, ec) );
+ VERIFY( exists(root, ec) );
VERIFY( !ec );
ec = bad_ec;
- VERIFY( exists(path{"/."}, ec) );
+ VERIFY( exists(root/".", ec) );
VERIFY( !ec );
ec = bad_ec;
VERIFY( exists(path{"."}, ec) );