summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/experimental/filesystem')
-rw-r--r--libcxx/test/std/experimental/filesystem/class.directory_iterator/directory_iterator.members/ctor.pass.cpp7
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/clear.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/c_str.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/native.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/operator_string.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp6
6 files changed, 12 insertions, 9 deletions
diff --git a/libcxx/test/std/experimental/filesystem/class.directory_iterator/directory_iterator.members/ctor.pass.cpp b/libcxx/test/std/experimental/filesystem/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
index a6becb1bafa..830e8123150 100644
--- a/libcxx/test/std/experimental/filesystem/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
@@ -87,9 +87,10 @@ TEST_CASE(access_denied_test_case)
env.create_file(testFile, 42);
// Test that we can iterator over the directory before changing the perms
- directory_iterator it(testDir);
- TEST_REQUIRE(it != directory_iterator{});
-
+ {
+ directory_iterator it(testDir);
+ TEST_REQUIRE(it != directory_iterator{});
+ }
// Change the permissions so we can no longer iterate
permissions(testDir, perms::none);
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/clear.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/clear.pass.cpp
index 5be934968c4..7881c9700d6 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/clear.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/clear.pass.cpp
@@ -28,7 +28,6 @@ namespace fs = std::experimental::filesystem;
int main() {
using namespace fs;
- const path p("/foo/bar/baz");
{
path p;
ASSERT_NOEXCEPT(p.clear());
@@ -37,6 +36,7 @@ int main() {
assert(p.empty());
}
{
+ const path p("/foo/bar/baz");
path p2(p);
assert(p == p2);
p2.clear();
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/c_str.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/c_str.pass.cpp
index 7cf3564bb9b..79660943272 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/c_str.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/c_str.pass.cpp
@@ -30,8 +30,8 @@ int main()
using namespace fs;
const char* const value = "hello world";
const std::string str_value = value;
- path p(value);
{ // Check signature
+ path p(value);
ASSERT_SAME_TYPE(path::value_type const*, decltype(p.c_str()));
ASSERT_NOEXCEPT(p.c_str());
}
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/native.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/native.pass.cpp
index 7f8df27faf0..db132648377 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/native.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/native.pass.cpp
@@ -28,8 +28,8 @@ int main()
{
using namespace fs;
const char* const value = "hello world";
- path p(value);
{ // Check signature
+ path p(value);
ASSERT_SAME_TYPE(path::string_type const&, decltype(p.native()));
ASSERT_NOEXCEPT(p.native());
}
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/operator_string.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/operator_string.pass.cpp
index 9ef83f989aa..013d26cdb7f 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/operator_string.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.native.obs/operator_string.pass.cpp
@@ -30,8 +30,8 @@ int main()
using namespace fs;
using string_type = path::string_type;
const char* const value = "hello world";
- path p(value);
{ // Check signature
+ path p(value);
static_assert(std::is_convertible<path, string_type>::value, "");
static_assert(std::is_constructible<string_type, path>::value, "");
ASSERT_SAME_TYPE(string_type, decltype(p.operator string_type()));
diff --git a/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp b/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
index 1cddccd0d72..8f6009d399c 100644
--- a/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
@@ -91,8 +91,10 @@ TEST_CASE(access_denied_test_case)
env.create_file(testFile, 42);
// Test that we can iterator over the directory before changing the perms
- RDI it(testDir);
- TEST_REQUIRE(it != RDI{});
+ {
+ RDI it(testDir);
+ TEST_REQUIRE(it != RDI{});
+ }
// Change the permissions so we can no longer iterate
permissions(testDir, perms::none);
OpenPOWER on IntegriCloud