/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
class ClustsizeTest : public CommandLineTestBase
{
- public:
- ClustsizeTest()
- {
- double tolerance = 1e-4;
- test::XvgMatch xvg;
- test::XvgMatch &toler = xvg.tolerance(gmx::test::relativeToleranceAsFloatingPoint(1, tolerance));
-
- setOutputFile("-mc", ".xvg", toler);
- setOutputFile("-nc", ".xvg", toler);
- setOutputFile("-ac", ".xvg", toler);
- setOutputFile("-hc", ".xvg", toler);
- setInputFile("-f", "clustsize.pdb");
- }
-
- void runTest(const CommandLine &args)
- {
- CommandLine &cmdline = commandLine();
- cmdline.merge(args);
-
- gmx::test::TestReferenceChecker rootChecker(this->rootChecker());
- rootChecker.checkString(args.toString(), "CommandLine");
-
- ASSERT_EQ(0, gmx_clustsize(cmdline.argc(), cmdline.argv()));
-
- checkOutputFiles();
- }
+public:
+ ClustsizeTest()
+ {
+ double tolerance = 1e-4;
+ test::XvgMatch xvg;
+ test::XvgMatch& toler = xvg.tolerance(gmx::test::relativeToleranceAsFloatingPoint(1, tolerance));
+
+ setOutputFile("-mc", ".xvg", toler);
+ setOutputFile("-nc", ".xvg", toler);
+ setOutputFile("-ac", ".xvg", toler);
+ setOutputFile("-hc", ".xvg", toler);
+ setInputFile("-f", "clustsize.pdb");
+ }
+
+ void runTest(const CommandLine& args)
+ {
+ CommandLine& cmdline = commandLine();
+ cmdline.merge(args);
+
+ gmx::test::TestReferenceChecker rootChecker(this->rootChecker());
+ rootChecker.checkString(args.toString(), "CommandLine");
+
+ ASSERT_EQ(0, gmx_clustsize(cmdline.argc(), cmdline.argv()));
+
+ checkOutputFiles();
+ }
};
TEST_F(ClustsizeTest, NoMolDefaultCutoff)
{
- const char *const command[] = { "clustsize" };
+ const char* const command[] = { "clustsize" };
CommandLine args = CommandLine(command);
setInputFile("-n", "clustsize.ndx");
TEST_F(ClustsizeTest, NoMolShortCutoff)
{
- const char *const command[] = { "clustsize", "-cut", "0.3" };
+ const char* const command[] = { "clustsize", "-cut", "0.3" };
CommandLine args = CommandLine(command);
setInputFile("-n", "clustsize.ndx");
TEST_F(ClustsizeTest, MolDefaultCutoff)
{
- const char *const command[] = { "clustsize", "-mol" };
+ const char* const command[] = { "clustsize", "-mol" };
CommandLine args = CommandLine(command);
setInputFile("-s", "clustsize.tpr");
TEST_F(ClustsizeTest, MolShortCutoff)
{
- const char *const command[] = { "clustsize", "-mol", "-cut", "0.3" };
+ const char* const command[] = { "clustsize", "-mol", "-cut", "0.3" };
CommandLine args = CommandLine(command);
setInputFile("-s", "clustsize.tpr");
TEST_F(ClustsizeTest, MolCSize)
{
- const char *const command[] = { "clustsize", "-mol", "-nlevels", "6" };
+ const char* const command[] = { "clustsize", "-mol", "-nlevels", "6" };
CommandLine args = CommandLine(command);
setOutputFile("-o", ".xpm", ExactTextMatch());