Merge remote-tracking branch 'github/develop' into collected-small-changes

This commit is contained in:
Axel Kohlmeyer
2022-08-27 10:12:58 -04:00
168 changed files with 2978 additions and 2547 deletions

View File

@ -45,7 +45,9 @@ protected:
{
testbinary = "LatticeRegionTest";
LAMMPSTest::SetUp();
command("units metal");
HIDE_OUTPUT([&] {
command("units metal");
});
}
};
@ -63,7 +65,7 @@ TEST_F(LatticeRegionTest, lattice_none)
ASSERT_EQ(lattice->basis, nullptr);
TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice"););
TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice xxx"););
TEST_FAILURE(".*ERROR: Unknown lattice keyword: xxx.*", command("lattice xxx"););
TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice none 1.0 origin"););
TEST_FAILURE(".*ERROR: Expected floating point.*", command("lattice none xxx"););
@ -114,10 +116,11 @@ TEST_F(LatticeRegionTest, lattice_sc)
ASSERT_EQ(lattice->basis[0][1], 0.0);
ASSERT_EQ(lattice->basis[0][2], 0.0);
TEST_FAILURE(".*ERROR: Illegal lattice command.*",
TEST_FAILURE(".*ERROR: Invalid lattice origin argument: 1.*",
command("lattice sc 1.0 origin 1.0 1.0 1.0"););
TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice sc 1.0 origin 1.0"););
TEST_FAILURE(".*ERROR: Illegal lattice command.*",
TEST_FAILURE(".*ERROR: Illegal lattice origin command: missing argument.*",
command("lattice sc 1.0 origin 1.0"););
TEST_FAILURE(".*ERROR: Unknown lattice keyword: xxx.*",
command("lattice sc 1.0 origin 0.0 0.0 0.0 xxx"););
TEST_FAILURE(".*ERROR: Expected floating point.*",
command("lattice sc 1.0 origin xxx 1.0 1.0"););
@ -195,11 +198,12 @@ TEST_F(LatticeRegionTest, lattice_fcc)
ASSERT_EQ(lattice->basis[3][1], 0.5);
ASSERT_EQ(lattice->basis[3][2], 0.5);
TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*",
TEST_FAILURE(".*ERROR: Invalid basis option in lattice command for non-custom style.*",
command("lattice fcc 1.0 basis 0.0 0.0 0.0"););
TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*",
TEST_FAILURE(".*ERROR: Invalid a1 option in lattice command for non-custom style.*",
command("lattice fcc 1.0 a1 0.0 1.0 0.0"););
TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice fcc 1.0 orient w 1 0 0"););
TEST_FAILURE(".*ERROR: Unknown lattice orient argument: w.*",
command("lattice fcc 1.0 orient w 1 0 0"););
BEGIN_HIDE_OUTPUT();
command("dimension 2");
@ -241,9 +245,9 @@ TEST_F(LatticeRegionTest, lattice_hcp)
ASSERT_EQ(lattice->a3[1], 0.0);
ASSERT_DOUBLE_EQ(lattice->a3[2], sqrt(8.0 / 3.0));
TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*",
TEST_FAILURE(".*ERROR: Invalid a2 option in lattice command for non-custom style.*",
command("lattice hcp 1.0 a2 0.0 1.0 0.0"););
TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*",
TEST_FAILURE(".*ERROR: Invalid a3 option in lattice command for non-custom style.*",
command("lattice hcp 1.0 a3 0.0 1.0 0.0"););
BEGIN_HIDE_OUTPUT();
command("dimension 2");
@ -452,9 +456,9 @@ TEST_F(LatticeRegionTest, lattice_custom)
ASSERT_DOUBLE_EQ(lattice->a3[1], 0.0);
ASSERT_DOUBLE_EQ(lattice->a3[2], 4.34 * sqrt(8.0 / 3.0));
TEST_FAILURE(".*ERROR: Illegal lattice command.*",
TEST_FAILURE(".*ERROR: Invalid lattice basis argument: -0.1.*",
command("lattice custom 1.0 basis -0.1 0 0"););
TEST_FAILURE(".*ERROR: Illegal lattice command.*",
TEST_FAILURE(".*ERROR: Invalid lattice basis argument: 1.*",
command("lattice custom 1.0 basis 0.0 1.0 0"););
BEGIN_HIDE_OUTPUT();

View File

@ -81,7 +81,7 @@ TEST_F(SimpleCommandsTest, Echo)
ASSERT_EQ(lmp->input->echo_log, 1);
TEST_FAILURE(".*ERROR: Illegal echo command.*", command("echo"););
TEST_FAILURE(".*ERROR: Illegal echo command.*", command("echo xxx"););
TEST_FAILURE(".*ERROR: Unknown echo keyword: xxx.*", command("echo xxx"););
}
TEST_F(SimpleCommandsTest, Log)

View File

@ -197,11 +197,11 @@ TEST_F(VariableTest, CreateDelete)
ASSERT_EQ(variable->internalstyle(variable->find("ten")), 1);
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable"););
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy index"););
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy delete xxx"););
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy loop -1"););
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy loop 10 1"););
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy xxxx"););
TEST_FAILURE(".*ERROR: Illegal variable index command.*", command("variable dummy index"););
TEST_FAILURE(".*ERROR: Illegal variable delete command: expected 2 arguments but found 3.*", command("variable dummy delete xxx"););
TEST_FAILURE(".*ERROR: Invalid variable loop argument: -1.*", command("variable dummy loop -1"););
TEST_FAILURE(".*ERROR: Illegal variable loop command.*", command("variable dummy loop 10 1"););
TEST_FAILURE(".*ERROR: Unknown variable keyword: xxx.*", command("variable dummy xxxx"););
TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*",
command("variable two string xxx"););
TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*",