recover failing unit tests and whitespace fixes
This commit is contained in:
@ -74,6 +74,13 @@ public:
|
|||||||
END_HIDE_OUTPUT();
|
END_HIDE_OUTPUT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void close_dump()
|
||||||
|
{
|
||||||
|
BEGIN_HIDE_OUTPUT();
|
||||||
|
command("undump id");
|
||||||
|
END_HIDE_OUTPUT();
|
||||||
|
}
|
||||||
|
|
||||||
void generate_text_and_binary_dump(std::string text_file, std::string binary_file,
|
void generate_text_and_binary_dump(std::string text_file, std::string binary_file,
|
||||||
std::string dump_modify_options, int ntimesteps)
|
std::string dump_modify_options, int ntimesteps)
|
||||||
{
|
{
|
||||||
@ -505,6 +512,7 @@ TEST_F(DumpAtomTest, rerun)
|
|||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
ASSERT_EQ(count_lines(dump_file), 82);
|
ASSERT_EQ(count_lines(dump_file), 82);
|
||||||
continue_dump(1);
|
continue_dump(1);
|
||||||
|
close_dump();
|
||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
ASSERT_EQ(count_lines(dump_file), 123);
|
ASSERT_EQ(count_lines(dump_file), 123);
|
||||||
@ -532,6 +540,7 @@ TEST_F(DumpAtomTest, rerun_bin)
|
|||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_1);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_1);
|
||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
continue_dump(1);
|
continue_dump(1);
|
||||||
|
close_dump();
|
||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
HIDE_OUTPUT([&] {
|
HIDE_OUTPUT([&] {
|
||||||
|
|||||||
@ -73,6 +73,13 @@ public:
|
|||||||
END_HIDE_OUTPUT();
|
END_HIDE_OUTPUT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void close_dump()
|
||||||
|
{
|
||||||
|
BEGIN_HIDE_OUTPUT();
|
||||||
|
command("undump id");
|
||||||
|
END_HIDE_OUTPUT();
|
||||||
|
}
|
||||||
|
|
||||||
void generate_text_and_binary_dump(std::string text_file, std::string binary_file,
|
void generate_text_and_binary_dump(std::string text_file, std::string binary_file,
|
||||||
std::string fields, std::string dump_modify_options,
|
std::string fields, std::string dump_modify_options,
|
||||||
int ntimesteps)
|
int ntimesteps)
|
||||||
@ -330,6 +337,7 @@ TEST_F(DumpCustomTest, rerun)
|
|||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
ASSERT_EQ(count_lines(dump_file), 82);
|
ASSERT_EQ(count_lines(dump_file), 82);
|
||||||
continue_dump(1);
|
continue_dump(1);
|
||||||
|
close_dump();
|
||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
ASSERT_EQ(count_lines(dump_file), 123);
|
ASSERT_EQ(count_lines(dump_file), 123);
|
||||||
@ -338,6 +346,7 @@ TEST_F(DumpCustomTest, rerun)
|
|||||||
});
|
});
|
||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_rerun);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_rerun);
|
||||||
ASSERT_DOUBLE_EQ(pe_1, pe_rerun);
|
ASSERT_DOUBLE_EQ(pe_1, pe_rerun);
|
||||||
|
|
||||||
HIDE_OUTPUT([&] {
|
HIDE_OUTPUT([&] {
|
||||||
command(fmt::format("rerun {} first 2 last 2 every 1 post yes dump x y z", dump_file));
|
command(fmt::format("rerun {} first 2 last 2 every 1 post yes dump x y z", dump_file));
|
||||||
});
|
});
|
||||||
@ -359,6 +368,7 @@ TEST_F(DumpCustomTest, rerun_bin)
|
|||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_1);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_1);
|
||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
continue_dump(1);
|
continue_dump(1);
|
||||||
|
close_dump();
|
||||||
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
lmp->output->thermo->evaluate_keyword("pe", &pe_2);
|
||||||
ASSERT_FILE_EXISTS(dump_file);
|
ASSERT_FILE_EXISTS(dump_file);
|
||||||
HIDE_OUTPUT([&] {
|
HIDE_OUTPUT([&] {
|
||||||
|
|||||||
Reference in New Issue
Block a user