Skip to content

Commit 7df814d

Browse files
authored
Test:update the global_file_test.cpp (#2024)
1 parent edbaaf4 commit 7df814d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/module_base/test/global_file_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ TEST_F(GlobalFile,mkdiratom)
3232
ModuleBase::Global_File::make_dir_atom("Si");
3333
int a = access("./Si/",0);
3434
EXPECT_EQ(a , 0);
35+
std::string ss = "./Si/";
36+
rmdir(ss.c_str());
3537
}
3638

3739
TEST_F(GlobalFile,openlog)
@@ -43,4 +45,6 @@ TEST_F(GlobalFile,openlog)
4345
ModuleBase::Global_File::open_log(ofs,"Si","md",false);
4446
EXPECT_TRUE(ofs.is_open());
4547
ofs.close();
48+
std::string sss = "Si.log";
49+
remove(sss.c_str());
4650
}

0 commit comments

Comments
 (0)