use alternate way to compare strings
This commit is contained in:
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
using ::testing::MatchesRegex;
|
using ::testing::MatchesRegex;
|
||||||
using ::testing::StartsWith;
|
using ::testing::StartsWith;
|
||||||
|
using ::testing::StrEq;
|
||||||
|
using ::testing::StrNe;
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
// test fixture for regular tests
|
// test fixture for regular tests
|
||||||
@ -91,13 +93,13 @@ TEST_F(LAMMPS_plain, InitMembers)
|
|||||||
EXPECT_NE(lmp->python, nullptr);
|
EXPECT_NE(lmp->python, nullptr);
|
||||||
EXPECT_EQ(lmp->citeme, nullptr);
|
EXPECT_EQ(lmp->citeme, nullptr);
|
||||||
if (LAMMPS::has_git_info) {
|
if (LAMMPS::has_git_info) {
|
||||||
EXPECT_STRNE(LAMMPS::git_commit, "");
|
EXPECT_THAT(LAMMPS::git_commit, StrNe(""));
|
||||||
EXPECT_STRNE(LAMMPS::git_branch, "");
|
EXPECT_THAT(LAMMPS::git_branch, StrNe(""));
|
||||||
EXPECT_STRNE(LAMMPS::git_descriptor, "");
|
EXPECT_THAT(LAMMPS::git_descriptor, StrNe(""));
|
||||||
} else {
|
} else {
|
||||||
EXPECT_STREQ(LAMMPS::git_commit, "(unknown)");
|
EXPECT_THAT(LAMMPS::git_commit, StrEq("(unknown)"));
|
||||||
EXPECT_STREQ(LAMMPS::git_branch, "(unknown)");
|
EXPECT_THAT(LAMMPS::git_branch, StrEq("(unknown)"));
|
||||||
EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)");
|
EXPECT_THAT(LAMMPS::git_descriptor, StrEq("(unknown)"));
|
||||||
}
|
}
|
||||||
EXPECT_EQ(lmp->comm->nthreads, 1);
|
EXPECT_EQ(lmp->comm->nthreads, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user