Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / options / tests / option.cpp
index 2cb3f3f5414db4c9031832d0bbb6b0999c90005d..70b513bdb79a3609c3ee92280d8d7a5d699184f9 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012, 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>
 
@@ -51,6 +53,8 @@
 #include "gromacs/options/options.h"
 #include "gromacs/utility/exceptions.h"
 
+#include "testutils/testasserts.h"
+
 namespace
 {
 
@@ -59,21 +63,21 @@ TEST(OptionsTest, FailsOnNonsafeStorage)
     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)
 {
     gmx::Options                options(NULL, NULL);
     std::string                 value;
-    const char * const          allowed[] = { "none", "test", "value", NULL };
+    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