Skip to content

Commit b3bfeb4

Browse files
committed
fix two issues in unittests
1 parent b41a4b4 commit b3bfeb4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

source/module_base/test/timer_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TimerTest : public testing::Test
4343
int T_Elapse = 100; // microseconds = 0.1 milliseconds
4444
void TearDown()
4545
{
46-
//remove("tmp");
46+
remove("tmp");
4747
}
4848
};
4949

source/module_hamilt_general/module_vdw/test/vdw_test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,18 @@ TEST_F(vdwd2Test, WrongVdwType)
196196
std::string output = testing::internal::GetCapturedStdout();
197197
}
198198

199+
200+
// mohan comment out 2025-04-05 since the original code has been removed.
201+
// further investigation is needed.
202+
/*
199203
TEST_F(vdwd2Test, OneAtomWarning)
200204
{
201205
UnitCell ucell1;
202206
stru_ structure1{std::vector<double>{0.5, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.5},
203207
std::vector<atomtype_>{atomtype_{"Si", std::vector<std::vector<double>>{{0., 0., 0.}}}}};
208+
204209
construct_ucell(structure1,ucell1);
210+
205211
GlobalV::ofs_warning.open("warning.log");
206212
std::ifstream ifs;
207213
std::string output;
@@ -217,6 +223,7 @@ TEST_F(vdwd2Test, OneAtomWarning)
217223
ifs.close();
218224
ClearUcell(ucell1);
219225
}
226+
*/
220227

221228
TEST_F(vdwd2Test, D2ReadFile)
222229
{
@@ -600,4 +607,4 @@ int main(int argc, char **argv)
600607
int result = RUN_ALL_TESTS();
601608
MPI_Finalize();
602609
return 0;
603-
}
610+
}

0 commit comments

Comments
 (0)