#include "gromacs/commandline/cmdlineoptionsmodule.h"
#include "gromacs/commandline/cmdlineprogramcontext.h"
#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/filestream.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/textreader.h"
#include "testutils/refdata.h"
#include "testutils/testfilemanager.h"
+#include "testutils/xvgtest.h"
namespace gmx
{
OutputFileInfo(const char *option, const std::string &path)
: option(option), path(path)
{
+ xvg = endsWith(path, ".xvg");
}
std::string option;
std::string path;
+ bool xvg;
};
typedef std::vector<OutputFileInfo> OutputFileList;
outfile != impl_->outputFiles_.end();
++outfile)
{
- std::string output = TextReader::readFileToString(outfile->path);
- outputChecker.checkStringBlock(output, outfile->option.c_str());
+ if (outfile->xvg)
+ {
+ TestReferenceChecker testChecker = checker.checkCompound("File",
+ outfile->option.c_str());
+ TextInputFile sis(outfile->path);
+ checkXvgFile(&sis, &testChecker);
+ }
+ else
+ {
+ std::string output = TextReader::readFileToString(outfile->path);
+ outputChecker.checkStringBlock(output, outfile->option.c_str());
+ }
}
}
}