/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2010,2011,2012,2013,2014, 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.
*
* GROMACS is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_commandline
*/
+#include "gmxpre.h"
+
+#include "gromacs/commandline/cmdlineparser.h"
+
#include <vector>
#include <gtest/gtest.h>
-#include "gromacs/commandline/cmdlineparser.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/options.h"
const char *const cmdline[] = {
"test", "-flag", "yes", "-mvi", "2", "-mvd", "2.7"
};
- CommandLine args(CommandLine::create(cmdline));
+ CommandLine args(cmdline);
ASSERT_NO_THROW_GMX(parser_.parse(&args.argc(), args.argv()));
ASSERT_NO_THROW_GMX(options_.finish());
const char *const cmdline[] = {
"test", "-mvi", "1", "-2", "-mvd", "-2.7"
};
- CommandLine args(CommandLine::create(cmdline));
+ CommandLine args(cmdline);
ASSERT_NO_THROW_GMX(parser_.parse(&args.argc(), args.argv()));
ASSERT_NO_THROW_GMX(options_.finish());
const char *const cmdline[] = {
"test", "--mvi", "1", "-2", "--mvd", "-2.7"
};
- CommandLine args(CommandLine::create(cmdline));
+ CommandLine args(cmdline);
ASSERT_NO_THROW_GMX(parser_.parse(&args.argc(), args.argv()));
ASSERT_NO_THROW_GMX(options_.finish());
const char *const cmdline[] = {
"test", "--12", "1", "-1p", "-12"
};
- CommandLine args(CommandLine::create(cmdline));
+ CommandLine args(cmdline);
ASSERT_NO_THROW_GMX(parser_.parse(&args.argc(), args.argv()));
ASSERT_NO_THROW_GMX(options_.finish());
const char *const cmdline[] = {
"test", "-opt1", "-flag", "-opt2", "value", "-mvi", "2", "-mvd", "2.7", "-opt3"
};
- CommandLine args(CommandLine::create(cmdline));
+ CommandLine args(cmdline);
parser_.skipUnknown(true);
ASSERT_NO_THROW_GMX(parser_.parse(&args.argc(), args.argv()));
ASSERT_NO_THROW_GMX(options_.finish());