[libcxx] r328477 - Fix test case initialization issues in permissions test
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 26 00:06:25 PDT 2018
Author: ericwf
Date: Mon Mar 26 00:06:25 2018
New Revision: 328477
URL: http://llvm.org/viewvc/llvm-project?rev=328477&view=rev
Log:
Fix test case initialization issues in permissions test
Modified:
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp?rev=328477&r1=328476&r2=328477&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp Mon Mar 26 00:06:25 2018
@@ -95,7 +95,10 @@ TEST_CASE(basic_permissions_test)
path p;
perms set_perms;
perms expected;
- perm_options opts = perm_options::replace;
+ perm_options opts;
+ TestCase(path xp, perms xperms, perms xexpect,
+ perm_options xopts = perm_options::replace)
+ : p(xp), set_perms(xperms), expected(xexpect), opts(xopts) {}
} cases[] = {
// test file
{file, perms::none, perms::none},
@@ -147,6 +150,9 @@ TEST_CASE(test_no_resolve_symlink_on_sym
perms set_perms;
perms expected; // only expected on platform that support symlink perms.
perm_options opts = perm_options::replace;
+ TestCase(perms xperms, perms xexpect,
+ perm_options xopts = perm_options::replace)
+ : set_perms(xperms), expected(xexpect), opts(xopts) {}
} cases[] = {
{perms::owner_all, perms::owner_all},
{perms::group_all, perms::owner_all | perms::group_all, perm_options::add},
More information about the cfe-commits
mailing list