Apply clang-format to source tree
[alexxy/gromacs.git] / src / testutils / stringtest.h
index 5685335cb357527859d4f49a0f2dd8d3b3616e42..dd766d12c56911fc8bd71b045ff4ce4e437c78e4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017,2018,2019, 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.
@@ -74,59 +74,57 @@ class TestReferenceChecker;
  */
 class StringTestBase : public ::testing::Test
 {
-    public:
-        /*! \brief
-         * Checks a block of text.
-         *
-         * This static method is provided for code that does not derive from
-         * StringTestBase to use the same functionality, e.g., implementing the
-         * `-stdout` option.
-         */
-        static void checkText(TestReferenceChecker *checker,
-                              const std::string &text, const char *id);
+public:
+    /*! \brief
+     * Checks a block of text.
+     *
+     * This static method is provided for code that does not derive from
+     * StringTestBase to use the same functionality, e.g., implementing the
+     * `-stdout` option.
+     */
+    static void checkText(TestReferenceChecker* checker, const std::string& text, const char* id);
 
-        StringTestBase();
-        ~StringTestBase() override;
+    StringTestBase();
+    ~StringTestBase() override;
 
-        /*! \brief
-         * Returns the root checker for this test's reference data.
-         *
-         * Can be used to perform custom checks against reference data (e.g.,
-         * if the test needs to check some other values than plain strings.
-         */
-        TestReferenceChecker &checker();
+    /*! \brief
+     * Returns the root checker for this test's reference data.
+     *
+     * Can be used to perform custom checks against reference data (e.g.,
+     * if the test needs to check some other values than plain strings.
+     */
+    TestReferenceChecker& checker();
 
-        /*! \brief
-         * Checks a string.
-         *
-         * \param[in] text  String to check.
-         * \param[in] id    Unique (within a single test) id for the string.
-         */
-        void checkText(const std::string &text, const char *id);
-        /*! \brief
-         * Checks contents of a file as a single string.
-         *
-         * \param[in] filename  Name of the file to check.
-         * \param[in] id        Unique (within a single test) id for the string.
-         *
-         * Provided for convenience.  Reads the contents of \p filename into a
-         * single string and calls checkText().
-         */
-        void checkFileContents(const std::string &filename, const char *id);
+    /*! \brief
+     * Checks a string.
+     *
+     * \param[in] text  String to check.
+     * \param[in] id    Unique (within a single test) id for the string.
+     */
+    void checkText(const std::string& text, const char* id);
+    /*! \brief
+     * Checks contents of a file as a single string.
+     *
+     * \param[in] filename  Name of the file to check.
+     * \param[in] id        Unique (within a single test) id for the string.
+     *
+     * Provided for convenience.  Reads the contents of \p filename into a
+     * single string and calls checkText().
+     */
+    void checkFileContents(const std::string& filename, const char* id);
 
-        /*! \brief
-         * Tests that contents of two files are equal.
-         *
-         * \param[in] refFilename   File with the expected contents.
-         * \param[in] testFilename  File with the contents to be tested.
-         */
-        void testFilesEqual(const std::string &refFilename,
-                            const std::string &testFilename);
+    /*! \brief
+     * Tests that contents of two files are equal.
+     *
+     * \param[in] refFilename   File with the expected contents.
+     * \param[in] testFilename  File with the contents to be tested.
+     */
+    void testFilesEqual(const std::string& refFilename, const std::string& testFilename);
 
-    private:
-        class Impl;
+private:
+    class Impl;
 
-        PrivateImplPointer<Impl> impl_;
+    PrivateImplPointer<Impl> impl_;
 };
 
 } // namespace test