Enable static anon namespace workaround on pathscale
[alexxy/gromacs.git] / src / gromacs / analysisdata / tests / histogram.cpp
index 5182e74c6e128f11f2ef98b9e88676fcb599252a..8a4cdacd1dfeee5937bda5630b8dcaaeeae8209b 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 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) 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
@@ -51,7 +51,7 @@
 #include "gromacs/analysisdata/analysisdata.h"
 #include "gromacs/analysisdata/modules/histogram.h"
 
-#include "testutils/datatest.h"
+#include "gromacs/analysisdata/tests/datatest.h"
 #include "testutils/testasserts.h"
 
 using gmx::test::AnalysisDataTestInput;
@@ -157,8 +157,13 @@ class SimpleInputData
     public:
         static const AnalysisDataTestInput &get()
         {
+#ifndef STATIC_ANON_NAMESPACE_BUG
             static SimpleInputData singleton;
             return singleton.data_;
+#else
+            static SimpleInputData singleton_histogram;
+            return singleton_histogram.data_;
+#endif
         }
 
         SimpleInputData() : data_(1, true)
@@ -238,8 +243,13 @@ class WeightedSimpleInputData
     public:
         static const AnalysisDataTestInput &get()
         {
+#ifndef STATIC_ANON_NAMESPACE_BUG
             static WeightedSimpleInputData singleton;
             return singleton.data_;
+#else
+            static WeightedSimpleInputData singleton_histogram;
+            return singleton_histogram.data_;
+#endif
         }
 
         WeightedSimpleInputData() : data_(1, true)
@@ -270,8 +280,13 @@ class WeightedDataSetInputData
     public:
         static const AnalysisDataTestInput &get()
         {
+#ifndef STATIC_ANON_NAMESPACE_BUG
             static WeightedDataSetInputData singleton;
             return singleton.data_;
+#else
+            static WeightedDataSetInputData singleton_histogram;
+            return singleton_histogram.data_;
+#endif
         }
 
         WeightedDataSetInputData() : data_(2, true)
@@ -437,8 +452,13 @@ class AverageInputData
     public:
         static const AnalysisDataTestInput &get()
         {
+#ifndef STATIC_ANON_NAMESPACE_BUG
             static AverageInputData singleton;
             return singleton.data_;
+#else
+            static AverageInputData singleton_histogram;
+            return singleton_histogram.data_;
+#endif
         }
 
         AverageInputData() : data_(1, false)
@@ -457,16 +477,17 @@ class AverageInputData
         AnalysisDataTestInput  data_;
 };
 
-/*! \internal \brief
+/*! \brief
  * Mock object for testing gmx::AbstractAverageHistogram.
  *
  * Exposes necessary methods from gmx::AbstractAverageHistogram to use with
  * gmx::test::AnalysisDataTestFixture::setupArrayData().
+ *
+ * \ingroup module_analysisdata
  */
 class MockAverageHistogram : public gmx::AbstractAverageHistogram
 {
     public:
-        MockAverageHistogram() {}
         //! Creates a histogram module with defined bin parameters.
         explicit MockAverageHistogram(const gmx::AnalysisHistogramSettings &settings)
             : AbstractAverageHistogram(settings)