On Windows the Regex matcher for '.' does not match '\n'
Thus we have to use ContainsRegex instead of MatchesRegex
This commit is contained in:
@ -36,7 +36,7 @@ using LAMMPS_NS::utils::split_words;
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
using ::testing::ExitedWithCode;
|
||||
using ::testing::MatchesRegex;
|
||||
using ::testing::ContainsRegex;
|
||||
using ::testing::StrEq;
|
||||
|
||||
class LatticeRegionTest : public LAMMPSTest {
|
||||
@ -82,7 +82,7 @@ TEST_F(LatticeRegionTest, lattice_sc)
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("lattice sc 1.0 spacing 1.5 2.0 3.0");
|
||||
auto output = END_CAPTURE_OUTPUT();
|
||||
ASSERT_THAT(output, MatchesRegex(".*Lattice spacing in x,y,z = 1.5.* 2.* 3.*"));
|
||||
ASSERT_THAT(output, ContainsRegex(".*Lattice spacing in x,y,z = 1.5.* 2.* 3.*"));
|
||||
|
||||
auto lattice = lmp->domain->lattice;
|
||||
ASSERT_EQ(lattice->xlattice, 1.5);
|
||||
@ -92,7 +92,7 @@ TEST_F(LatticeRegionTest, lattice_sc)
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("lattice sc 2.0");
|
||||
output = END_CAPTURE_OUTPUT();
|
||||
ASSERT_THAT(output, MatchesRegex(".*Lattice spacing in x,y,z = 2.* 2.* 2.*"));
|
||||
ASSERT_THAT(output, ContainsRegex(".*Lattice spacing in x,y,z = 2.* 2.* 2.*"));
|
||||
|
||||
lattice = lmp->domain->lattice;
|
||||
ASSERT_EQ(lattice->style, Lattice::SC);
|
||||
|
||||
Reference in New Issue
Block a user