Skip to content

Commit 364dda6

Browse files
committed
Do not call destructors directly
1 parent 781e5b1 commit 364dda6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/directory.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,18 @@ TEST(directory, destructor) {
113113
/// Tests directory move constructor
114114
TEST(directory, move_constructor) {
115115
directory fst = directory();
116-
directory snd = directory(std::move(fst));
116+
fs::path path = fst;
117117

118-
fst.~directory();
118+
directory snd = directory(std::move(fst));
119119

120-
EXPECT_FALSE(snd.path().empty());
120+
EXPECT_TRUE(fs::equivalent(path, snd));
121121
EXPECT_TRUE(fs::exists(snd));
122122
}
123123

124124
/// Tests directory move assignment operator
125125
TEST(directory, move_assignment) {
126126
directory fst = directory();
127+
127128
{
128129
directory snd = directory();
129130

0 commit comments

Comments
 (0)