/*
* 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_options
*/
-#include <vector>
+#include "gmxpre.h"
+
#include <string>
+#include <vector>
#include <gtest/gtest.h>
#include "gromacs/options/options.h"
#include "gromacs/utility/exceptions.h"
+#include "testutils/testasserts.h"
+
namespace
{
gmx::Options options(NULL, NULL);
int value = -1;
using gmx::IntegerOption;
- ASSERT_THROW(options.addOption(IntegerOption("name").store(&value)
- .multiValue()),
- gmx::APIError);
+ ASSERT_THROW_GMX(options.addOption(IntegerOption("name").store(&value)
+ .multiValue()),
+ gmx::APIError);
}
TEST(OptionsTest, FailsOnIncorrectEnumDefaultValue)
std::string value;
const char * const allowed[] = { "none", "test", "value" };
using gmx::StringOption;
- ASSERT_THROW(options.addOption(StringOption("name").store(&value)
- .enumValue(allowed)
- .defaultValue("unknown")),
- gmx::APIError);
+ ASSERT_THROW_GMX(options.addOption(StringOption("name").store(&value)
+ .enumValue(allowed)
+ .defaultValue("unknown")),
+ gmx::APIError);
}
} // namespace