Skip to content

Commit a61e13c

Browse files
committed
fix typos and unittests
1 parent b1078eb commit a61e13c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

source/module_cell/read_atom_species.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ bool read_atom_species(std::ifstream& ifa,
6262
}
6363
else
6464
{
65-
GlobalV::ofs_warning << "unrecongnized pseudopotential type: "
65+
GlobalV::ofs_warning << "unrecognized pseudopotential type: "
6666
<< one_string << ", check your STRU file." << std::endl;
67-
ModuleBase::WARNING_QUIT("read_atom_species", "unrecongnized pseudopotential type.");
67+
ModuleBase::WARNING_QUIT("read_atom_species", "unrecognized pseudopotential type.");
6868
}
6969
}
7070

source/module_cell/test/unitcell_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Magnetism::~Magnetism()
108108
* - ReadAtomSpecies
109109
* - read_atom_species(): a successful case
110110
* - ReadAtomSpeciesWarning1
111-
* - read_atom_species(): unrecongnized pseudo type.
111+
* - read_atom_species(): unrecognized pseudopotential type.
112112
* - ReadAtomSpeciesWarning2
113113
* - read_atom_species(): lat0<=0.0
114114
* - ReadAtomSpeciesWarning3
@@ -149,7 +149,7 @@ Magnetism::~Magnetism()
149149
* - ReadAtomPositionsWarning4
150150
* - read_atom_positions(): mismatch in atom number for atom type
151151
* - ReadAtomPositionsWarning5
152-
* - read_atom_positions(): no atom can move in MD!
152+
* - read_atom_positions(): no atoms can move in MD simulations!
153153
*/
154154

155155
// mock function
@@ -1192,7 +1192,7 @@ TEST_F(UcellTestReadStru, ReadAtomSpeciesWarning1)
11921192
testing::internal::CaptureStdout();
11931193
EXPECT_EXIT(unitcell::read_atom_species(ifa, ofs_running,*ucell), ::testing::ExitedWithCode(1), "");
11941194
output = testing::internal::GetCapturedStdout();
1195-
EXPECT_THAT(output, testing::HasSubstr("unrecongnized pseudo type."));
1195+
EXPECT_THAT(output, testing::HasSubstr("unrecognized pseudopotential type."));
11961196
ofs_running.close();
11971197
ifa.close();
11981198
//remove("read_atom_species.txt");
@@ -1908,7 +1908,7 @@ TEST_F(UcellTestReadStru, ReadAtomPositionsWarning5)
19081908
std::ifstream ifs_tmp;
19091909
ifs_tmp.open("read_atom_positions.warn");
19101910
std::string str((std::istreambuf_iterator<char>(ifs_tmp)), std::istreambuf_iterator<char>());
1911-
EXPECT_THAT(str, testing::HasSubstr("read_atoms warning : no atom can move in MD!"));
1911+
EXPECT_THAT(str, testing::HasSubstr("read_atoms warning : no atoms can move in MD simulations!"));
19121912
ifs_tmp.close();
19131913
remove("read_atom_positions.tmp");
19141914
remove("read_atom_positions.warn");

0 commit comments

Comments
 (0)