We're checking a permission denied exception message that's
runtime specific:
/mnt/data/workspace/ceph_mingw_clang/src/test/dokan/dokan.cc:252: Failure
Expected equality of these values:
e.what()
Which is: "filesystem error: in remove: Permission denied
[\"Z:\\ro_success_b76223c4-c590-45e0-ab78-
4d281ac512b5\"]"
exception_msg.c_str()
Which is: "filesystem error: cannot remove: No such device
[Z:\\ro_success_b76223c4-c590-45e0-ab78-
4d281ac512b5]"
In order to support libc++, we'll drop the exception message
assertion and rely on the exception type.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
ASSERT_TRUE(fs::exists(mountpoint + success_file_path));
ASSERT_EQ(read_file(mountpoint + success_file_path), data);
- std::string exception_msg(
- "filesystem error: cannot remove: No such device ["
- + mountpoint + success_file_path + "]");
+ // The actual exception message is runtime dependent.
EXPECT_THROW({
- try {
- fs::remove(mountpoint + success_file_path);
- } catch(const fs::filesystem_error &e) {
- EXPECT_STREQ(e.what(), exception_msg.c_str());
- throw;
- }
+ fs::remove(mountpoint + success_file_path);
}, fs::filesystem_error);
unmap_dokan(mount, mountpoint.c_str());