From 44e983f6415d86ae241073585abc76c4e5cd64a1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 10 Sep 2022 04:54:48 -0400 Subject: [PATCH] more dump tests --- unittest/formats/test_dump_atom.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/unittest/formats/test_dump_atom.cpp b/unittest/formats/test_dump_atom.cpp index 6fe4d0e1ae..683578d04f 100644 --- a/unittest/formats/test_dump_atom.cpp +++ b/unittest/formats/test_dump_atom.cpp @@ -794,6 +794,13 @@ TEST_F(DumpAtomTest, colname) command("run 10 post no"); command("dump_modify id colname default"); command("run 10 post no"); + command("dump_modify id colname id AtomID colname 3 x-scaled colname -4 z-scaled"); + command("dump_modify id scale no image yes"); + command("run 10 post no"); + command("dump_modify id colname id AtomID colname 3 X colname -4 Z colname ix img_x"); + command("run 10 post no"); + command("dump_modify id colname default"); + command("run 10 post no"); command("undump id"); END_HIDE_OUTPUT(); @@ -810,6 +817,18 @@ TEST_F(DumpAtomTest, colname) for (int i = 0; i < expected.size(); ++i) ASSERT_THAT(values[i], Eq(expected[i])); + values = extract_items(dump_file, "ATOMS id type x y z ix iy iz"); + expected = {"1 1 0 0 0 0 0 0", "1 1 0 0 0 0 0 0"}; + ASSERT_EQ(values.size(), expected.size()); + for (int i = 0; i < expected.size(); ++i) + ASSERT_THAT(values[i], Eq(expected[i])); + + values = extract_items(dump_file, "ATOMS AtomID type X y Z img_x iy iz"); + expected = {"1 1 0 0 0 0 0 0"}; + ASSERT_EQ(values.size(), expected.size()); + for (int i = 0; i < expected.size(); ++i) + ASSERT_THAT(values[i], Eq(expected[i])); + delete_file(dump_file); }