]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc
PR libstdc++/78870 support std::filesystem on Windows
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / filesystem / operations / exists.cc
index d73ff35a539fc070b67b3a81fa2b9dd0d443a363..f8a4a280537ccf8a0e0c153c6a17d060c66dc88e 100644 (file)
@@ -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) );