Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / commandline / tests / cmdlineprogramcontext.cpp
index 36157d5d1dd24829b67a8266bc80558f9bf95d8f..f31c3ea405220bacb8763ec947771fe9b3415e12 100644 (file)
  */
 /*! \internal \file
  * \brief
- * Tests for gmx::ProgramInfo.
+ * Tests for gmx::CommandLineProgramContext.
  *
  * \author Teemu Murtola <teemu.murtola@gmail.com>
- * \ingroup module_utility
+ * \ingroup module_commandline
  */
+#include "gmxpre.h"
+
+#include "gromacs/commandline/cmdlineprogramcontext.h"
+
+#include "config.h"
+
 #include <string>
 #include <vector>
 
+#include <boost/shared_ptr.hpp>
 #include <gtest/gtest.h>
 
-#include "gromacs/commandline/cmdlineprogramcontext.h"
 #include "gromacs/utility/common.h"
 #include "gromacs/utility/path.h"
-#include "gromacs/utility/uniqueptr.h"
 
 #include "testutils/cmdlinetest.h"
 
-#include "config.h"
-
 using gmx::test::CommandLine;
 using gmx::Path;
 
@@ -93,13 +96,13 @@ class TestExecutableEnvironment : public gmx::ExecutableEnvironmentInterface
 };
 
 //! Shorthand for a smart pointer to TestExecutableEnvironment.
-typedef gmx::gmx_unique_ptr<TestExecutableEnvironment>::type
+typedef boost::shared_ptr<TestExecutableEnvironment>
     TestExecutableEnvironmentPointer;
 
-class ProgramInfoTest : public ::testing::Test
+class CommandLineProgramContextTest : public ::testing::Test
 {
     public:
-        ProgramInfoTest()
+        CommandLineProgramContextTest()
             : env_(new TestExecutableEnvironment())
         {
             expectedExecutable_ =
@@ -111,7 +114,7 @@ class ProgramInfoTest : public ::testing::Test
         void testBinaryPathSearch(const char *argv0)
         {
             ASSERT_TRUE(env_.get() != NULL);
-            gmx::ProgramInfo  info(1, &argv0, move(env_));
+            gmx::CommandLineProgramContext  info(1, &argv0, env_);
             EXPECT_EQ(expectedExecutable_, info.fullBinaryPath());
         }
         void testBinaryPathSearch(const std::string &argv0)
@@ -123,23 +126,23 @@ class ProgramInfoTest : public ::testing::Test
         TestExecutableEnvironmentPointer env_;
 };
 
-TEST_F(ProgramInfoTest, FindsBinaryWithAbsolutePath)
+TEST_F(CommandLineProgramContextTest, FindsBinaryWithAbsolutePath)
 {
     testBinaryPathSearch(Path::join(env_->getWorkingDirectory(), "bin/test-exe"));
 }
 
-TEST_F(ProgramInfoTest, FindsBinaryWithRelativePath)
+TEST_F(CommandLineProgramContextTest, FindsBinaryWithRelativePath)
 {
     testBinaryPathSearch("bin/test-exe");
 }
 
-TEST_F(ProgramInfoTest, FindsBinaryFromPath)
+TEST_F(CommandLineProgramContextTest, FindsBinaryFromPath)
 {
     env_->path_.push_back(Path::join(env_->getWorkingDirectory(), "bin"));
     testBinaryPathSearch("test-exe");
 }
 
-TEST_F(ProgramInfoTest, FindsBinaryFromCurrentDirectory)
+TEST_F(CommandLineProgramContextTest, FindsBinaryFromCurrentDirectory)
 {
     env_->workingDirectory_ = Path::join(env_->getWorkingDirectory(), "bin");
     env_->path_.push_back("");
@@ -147,12 +150,12 @@ TEST_F(ProgramInfoTest, FindsBinaryFromCurrentDirectory)
 }
 
 #ifdef TEST_SYMLINKS
-TEST_F(ProgramInfoTest, FindsBinaryFromAbsoluteSymLink)
+TEST_F(CommandLineProgramContextTest, FindsBinaryFromAbsoluteSymLink)
 {
     testBinaryPathSearch("bin/test-abs-link");
 }
 
-TEST_F(ProgramInfoTest, FindsBinaryFromRelativeSymLink)
+TEST_F(CommandLineProgramContextTest, FindsBinaryFromRelativeSymLink)
 {
     testBinaryPathSearch("bin/test-rel-link");
 }