Manual reformatting in preparation for uncrustify.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 10 Feb 2013 19:04:42 +0000 (21:04 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sun, 10 Feb 2013 19:04:42 +0000 (21:04 +0200)
Reindent example code blocks in Doxygen comments to align as uncrustify
would align them.  New enough Doxygen should be able to strip the leading
whitespace from the blocks.  Disable uncrustify indentation in one
static data declaration where uncrustify can't keep the original manual
indentation.

Related to #845.

Change-Id: I585852db6fc08557ca55cba41a1349533e1b9c4d

21 files changed:
src/gromacs/analysisdata/modules/histogram.h
src/gromacs/analysisdata/tests/average.cpp
src/gromacs/commandline/cmdlinemodulemanager.h
src/gromacs/commandline/cmdlineparser.h
src/gromacs/onlinehelp/helpformat.h
src/gromacs/onlinehelp/helptopic.h
src/gromacs/options/abstractoption.h
src/gromacs/options/basicoptions.h
src/gromacs/options/options.h
src/gromacs/options/optionsassigner.h
src/gromacs/options/optionsvisitor.h
src/gromacs/selection/selectionoption.h
src/gromacs/selection/selmethod.h
src/gromacs/utility/common.h
src/gromacs/utility/exceptions.h
src/gromacs/utility/file.h
src/gromacs/utility/messagestringcollector.h
src/gromacs/utility/stringutil.h
src/gromacs/utility/uniqueptr.h
src/testutils/refdata.h
src/testutils/testexceptions.h

index 4530406be797eaa9bd0d9a0a45b6a1430e04015b..99b24326d0060c490c257b11ac9e90208af89d69 100644 (file)
@@ -202,9 +202,9 @@ class AnalysisHistogramSettings
          * This constructor is not explicit to allow initialization of
          * histograms directly from AnalysisHistogramSettingsInitializer:
          * \code
-         gmx::AnalysisDataSimpleHistogramModule *hist =
-            new gmx::AnalysisDataSimpleHistogramModule(
-                histogramFromRange(0.0, 5.0).binWidth(0.5));
+           gmx::AnalysisDataSimpleHistogramModule *hist =
+                   new gmx::AnalysisDataSimpleHistogramModule(
+                           histogramFromRange(0.0, 5.0).binWidth(0.5));
          * \endcode
          */
         AnalysisHistogramSettings(const AnalysisHistogramSettingsInitializer &settings);
index 4d53486c1e3e9a8956c67b9217b4a45beb6a150d..5857be38c3239998e954bc24bc3d837b1986e10c 100644 (file)
@@ -62,12 +62,14 @@ const real inputdata[] = {
 };
 //! Multipoint input data for gmx::AnalysisDataAverageModule tests.
 const real mpinputdata[] = {
+    // *INDENT-OFF*
     1.0,  0.0, 1.0, 2.0, MPSTOP,
           1.0, 0.0, MPSTOP,
           2.0, END_OF_FRAME,
     2.0,  1.0, 1.0, MPSTOP,
           2.0, END_OF_FRAME,
     3.0,  2.0, 0.0, 0.0, END_OF_FRAME
+    // *INDENT-ON*
 };
 
 
index 91e43dcb542eeeb2d0f83a2f0e40f249f08d5012..d16f1bc9e39903bcee963a274f4bf81037e99f43 100644 (file)
@@ -58,24 +58,24 @@ typedef gmx_unique_ptr<CommandLineModuleInterface>::type
  *
  * Typical usage:
  * \code
-int
-main(int argc, char *argv[])
-{
-    const gmx::ProgramInfo &programInfo =
-        gmx::ProgramInfo::init("gmx", argc, argv);
-    CopyRight(stderr, argv[0]);
-    try
-    {
-        gmx::CommandLineModuleManager manager(programInfo);
-        // <register all necessary modules>
-        return manager.run(argc, argv);
-    }
-    catch (const std::exception &ex)
-    {
-        gmx::printFatalErrorMessage(stderr, ex);
-        return 1;
-    }
-}
+   int
+   main(int argc, char *argv[])
+   {
+       const gmx::ProgramInfo &programInfo =
+           gmx::ProgramInfo::init("gmx", argc, argv);
+       CopyRight(stderr, argv[0]);
+       try
+       {
+           gmx::CommandLineModuleManager manager(programInfo);
+           // <register all necessary modules>
+           return manager.run(argc, argv);
+       }
+       catch (const std::exception &ex)
+       {
+           gmx::printFatalErrorMessage(stderr, ex);
+           return 1;
+       }
+   }
  * \endcode
  *
  * \inpublicapi
index dee2d3503a2173cf0114f34c398c4b804d7b520c..9b3eeee026ea6e4df5645e0427c83d34817852ef 100644 (file)
@@ -54,11 +54,11 @@ class Options;
  *
  * Typical usage (without error checking):
  * \code
-gmx::Options options("name", "description");
-// Fill up options
+   gmx::Options options("name", "description");
+   // Fill up options
 
-gmx::CommandLineParser(&options).parse(&argc, argv);
-options.finish();
+   gmx::CommandLineParser(&options).parse(&argc, argv);
+   options.finish();
  * \endcode
  *
  * \inpublicapi
index 864caaad5661cb6959a7a9a6ce81518e1007f913..f2a5529d65b603ebfc8f68d71411f3f8a056f886 100644 (file)
@@ -70,25 +70,25 @@ class File;
  *
  * Typical usage:
  * \code
-gmx::TextTableFormatter formatter;
-formatter.addColumn("Name", 10, false);
-formatter.addColumn("Type", 10, false);
-formatter.addColumn("Description", 50, true);
-
-formatter.clear();
-formatter.addColumnLine(0, "name");
-formatter.addColumnLine(1, "type");
-formatter.addColumnLine(2, "Description for name");
-printf("%s", formatter.formatRow().c_str());
-
-formatter.clear();
-formatter.addColumnLine(0, "averylongname");
-formatter.addColumnLine(1, "type");
-formatter.setColumnFirstLineOffset(1, 1);
-formatter.addColumnLine(2, "Description for name");
-printf("%s", formatter.formatRow().c_str());
-
-// format other rows by repeating the above code
+   gmx::TextTableFormatter formatter;
+   formatter.addColumn("Name", 10, false);
+   formatter.addColumn("Type", 10, false);
+   formatter.addColumn("Description", 50, true);
+
+   formatter.clear();
+   formatter.addColumnLine(0, "name");
+   formatter.addColumnLine(1, "type");
+   formatter.addColumnLine(2, "Description for name");
+   printf("%s", formatter.formatRow().c_str());
+
+   formatter.clear();
+   formatter.addColumnLine(0, "averylongname");
+   formatter.addColumnLine(1, "type");
+   formatter.setColumnFirstLineOffset(1, 1);
+   formatter.addColumnLine(2, "Description for name");
+   printf("%s", formatter.formatRow().c_str());
+
+   // format other rows by repeating the above code
  * \endcode
  *
  * Methods in this class may throw std::bad_alloc if out of memory.
index 41b0099249638aa1ea363313007eaf1633ed8a44..bb13bdc79ca1475fd3f80a395406fa28839b88a6 100644 (file)
@@ -215,22 +215,22 @@ typedef gmx_unique_ptr<AbstractCompositeHelpTopic>::type
  *
  * Typical use:
  * \code
-struct ExampleHelpText
-{
-    static const char name[];
-    static const char title[];
-    static const char *const text[];
-};
+   struct ExampleHelpText
+   {
+       static const char name[];
+       static const char title[];
+       static const char *const text[];
+   };
 
-const char ExampleHelpText::name[] = "example";
-const char ExampleHelpText::title[] =
-    "Example title";
-const char *const ExampleHelpText::text[] = {
-    "Text for the topic.",
-    "More text for the topic."
-};
+   const char ExampleHelpText::name[] = "example";
+   const char ExampleHelpText::title[] =
+       "Example title";
+   const char *const ExampleHelpText::text[] = {
+       "Text for the topic.",
+       "More text for the topic."
+   };
 
-typedef SimpleHelpTopic<ExampleHelpText> ExampleHelpTopic;
+   typedef SimpleHelpTopic<ExampleHelpText> ExampleHelpTopic;
  * \endcode
  *
  * \inlibraryapi
index 5282a147b61959b676c0d54e6979f0f6c5ba296d..4cddcd6c10517a52f9d4c5ac9940649dc3673c73 100644 (file)
@@ -209,8 +209,8 @@ class AbstractOption
  *
  * This template is used as a base class like this:
  * \code
-class ConcreteOption : public OptionTemplate<int, ConcreteOption>
-{
+   class ConcreteOption : public OptionTemplate<int, ConcreteOption>
+   {
  * \endcode
  *
  * All public functions in this class return \c *this casted to a reference to
index c43b5f747dc632e42eb6fa6e01885dac70da2635..8c964d3a4cefcb4c64c76c829c6adfc15759b93a 100644 (file)
@@ -69,9 +69,9 @@ class StringOptionStorage;
  *
  * Example:
  * \code
-bool  bPBC;
-using gmx::BooleanOption;
-options.addOption(BooleanOption("pbc").store(&bPBC));
+   bool  bPBC;
+   using gmx::BooleanOption;
+   options.addOption(BooleanOption("pbc").store(&bPBC));
  * \endcode
  *
  * Public methods in this class do not throw.
@@ -97,13 +97,13 @@ class BooleanOption : public OptionTemplate<bool, BooleanOption>
  *
  * Examples:
  * \code
-using gmx::IntegerOption;
-// Simple option
-int  rcut = 0;
-options.addOption(IntegerOption("rcut").store(&rcut));
-// Vector-valued option
-int  box[3] = {1, 1, 1};  // Default value
-options.addOption(IntegerOption("box").store(box).vector());
+   using gmx::IntegerOption;
+   // Simple option
+   int  rcut = 0;
+   options.addOption(IntegerOption("rcut").store(&rcut));
+   // Vector-valued option
+   int  box[3] = {1, 1, 1};  // Default value
+   options.addOption(IntegerOption("box").store(box).vector());
  * \endcode
  *
  * Public methods in this class do not throw.
@@ -192,16 +192,16 @@ class DoubleOption : public OptionTemplate<double, DoubleOption>
  *
  * Examples:
  * \code
-using gmx::StringOption;
-// Simple option
-std::string  str;
-options.addOption(StringOption("str").store(&str));
-// Option that only accepts predefined values
-const char * const  allowed[] = { "atom", "residue", "molecule", NULL };
-std::string  str;
-int          type;
-options.addOption(StringOption("type").enumValue(allowed).store(&str)
-                     .storeEnumIndex(&type));
+   using gmx::StringOption;
+   // Simple option
+   std::string  str;
+   options.addOption(StringOption("str").store(&str));
+   // Option that only accepts predefined values
+   const char * const  allowed[] = { "atom", "residue", "molecule", NULL };
+   std::string  str;
+   int          type;
+   options.addOption(StringOption("type").enumValue(allowed).store(&str)
+                        .storeEnumIndex(&type));
  * \endcode
  *
  * Public methods in this class do not throw.
index 3caf93b5a971be3dc46d24f75e3a68d2ee617438..e68807f1447fa08febe9a2157631fbc87d802fc4 100644 (file)
@@ -63,18 +63,18 @@ class OptionsIterator;
  * Standard usage is to write a method that creates an Options that is owned by
  * the object, populates it with supported options, and then returns it:
  * \code
-// <as class attributes>
-using gmx::Options;
-Options      options("common", "Common Options");
-std::string  arg1;
-int          arg2;
-
-// <populating>
-using gmx::StringOption;
-using gmx::IntegerOption;
-options.addOption(StringOption("arg1").store(&arg1));
-options.addOption(IntegerOption("arg2").store(&arg2));
-return &options;
+   // <as class attributes>
+   using gmx::Options;
+   Options      options("common", "Common Options");
+   std::string  arg1;
+   int          arg2;
+
+   // <populating>
+   using gmx::StringOption;
+   using gmx::IntegerOption;
+   options.addOption(StringOption("arg1").store(&arg1));
+   options.addOption(IntegerOption("arg2").store(&arg2));
+   return &options;
  * \endcode
  * The caller of that method can then use a parser implementation such as
  * CommandLineParser to provide values for the options.
index e8d8b0eb0838036c51cc8627a2e0d49ad09bab15..27f5f2120b1bf8c399428487170f19c5d75b228d 100644 (file)
@@ -58,23 +58,23 @@ class Options;
  * to assign values to options in subsections within the Options object.
  * Typical use (without error handling):
  * \code
-gmx::options::Options options("name", "Title");
-// Set up options
+   gmx::options::Options options("name", "Title");
+   // Set up options
 
-gmx::options::OptionsAssigner assigner(&options);
-assigner.start();
-assigner.startOption("opt1");
-assigner.appendValue("3");
-assigner.finishOption();
-assigner.startSubSection("section");
-assigner.startOption("opt2"); // Now in the subsection
-assigner.appendValue("yes");
-assigner.finishOption();
-assigner.finishSubSection()
-assigner.startOption("opt3"); // Again in the main options
-assigner.appendValue("2");
-assigner.finishOption();
-assigner.finish();
+   gmx::options::OptionsAssigner assigner(&options);
+   assigner.start();
+   assigner.startOption("opt1");
+   assigner.appendValue("3");
+   assigner.finishOption();
+   assigner.startSubSection("section");
+   assigner.startOption("opt2"); // Now in the subsection
+   assigner.appendValue("yes");
+   assigner.finishOption();
+   assigner.finishSubSection()
+   assigner.startOption("opt3"); // Again in the main options
+   assigner.appendValue("2");
+   assigner.finishOption();
+   assigner.finish();
  * \endcode
  *
  * \inlibraryapi
index 2a4e95b06a9870b0151ee5560b225fda6e9056b1..29961efa13cb5a954addfb564891a0c7bc2857a3 100644 (file)
@@ -116,23 +116,23 @@ class OptionsTypeVisitor : public OptionsVisitor
  * Typical use (loop over all options, iteratively descending into
  * subsections):
  * \code
-class Visitor : public gmx::OptionsVisitor
-{
-    public:
-        void visitSubSection(const Options &section)
-        {
-            OptionsIterator iterator(section);
-            iterator.acceptSubSections(this);
-            iterator.acceptOptions(this);
-        }
+   class Visitor : public gmx::OptionsVisitor
+   {
+       public:
+           void visitSubSection(const Options &section)
+           {
+               OptionsIterator iterator(section);
+               iterator.acceptSubSections(this);
+               iterator.acceptOptions(this);
+           }
 
-        void visitOption(const OptionInfo &option)
-        {
-            // Do something.
-        }
-}
+           void visitOption(const OptionInfo &option)
+           {
+               // Do something.
+           }
+   }
 
-Visitor().visitSubSection(options);
+   Visitor().visitSubSection(options);
  * \endcode
  *
  * \inlibraryapi
index 20c9083fb9f19aee22df10c33b7dc4402f19327b..98b067350ab3af342976a944f4fcf9f75155d720 100644 (file)
@@ -165,20 +165,20 @@ class SelectionOption : public OptionTemplate<Selection, SelectionOption>
  *
  * Example use:
  * \code
-SelectionList sel;
-Options options("example", "Example options");
-SelectionOptionInfo *info;
-info = options.addOption(SelectionOption("sel").storeVector(&sel)
-                             .multiValue());
-// < ... assign values to options ...>
-if ( condition )
-{
-    // Put limitations on the selections based on the condition,
-    // which can depend on other option values.
-    // Throws if input given so far violates the limitations.
-    info->setValueCount(2);
-    info->setOnlyStatic(true);
-}
+   SelectionList sel;
+   Options options("example", "Example options");
+   SelectionOptionInfo *info;
+   info = options.addOption(SelectionOption("sel").storeVector(&sel)
+                                .multiValue());
+   // < ... assign values to options ...>
+   if ( condition )
+   {
+       // Put limitations on the selections based on the condition,
+       // which can depend on other option values.
+       // Throws if input given so far violates the limitations.
+       info->setValueCount(2);
+       info->setOnlyStatic(true);
+   }
  * \endcode
  *
  * \inpublicapi
index dec0dc7e801d75b3149e9d1e5e843f4ae05b23ed..f338f7e83ceec3e1350b02c81bb57a63e9fdd0b3 100644 (file)
  * An example \c gmx_ana_selmethod_t definition could look like this:
  *
  * \code
* gmx_ana_selmethod_t sm_example = {
*   "example", GROUP_VALUE, 0,
*   asize(sm_params_example), sm_params_example,
*   &init_data_example,
*    NULL,
*   &init_example,
*    NULL,
*   &free_data_example,
*   &init_frame_example,
*   &evaluate_example,
*    NULL,
*   {"example from POS_EXPR [cutoff REAL]", 0, NULL},
* };
  gmx_ana_selmethod_t sm_example = {
      "example", GROUP_VALUE, 0,
      asize(sm_params_example), sm_params_example,
      &init_data_example,
       NULL,
      &init_example,
       NULL,
      &free_data_example,
      &init_frame_example,
      &evaluate_example,
       NULL,
      {"example from POS_EXPR [cutoff REAL]", 0, NULL},
  };
  * \endcode
  *
  * The first value defines the name of the method.
  *
  * An example parameter definition:
  * \code
* static gmx_ana_selparam_t sm_params_example[] = {
*   {"cutoff", {REAL_VALUE, 1, {NULL}}, NULL, SPAR_OPTIONAL},
*   {"from",   {POS_VALUE, -1, {NULL}}, NULL, SPAR_DYNAMIC | SPAR_VARNUM},
* };
  static gmx_ana_selparam_t sm_params_example[] = {
    {"cutoff", {REAL_VALUE, 1, {NULL}}, NULL, SPAR_OPTIONAL},
    {"from",   {POS_VALUE, -1, {NULL}}, NULL, SPAR_DYNAMIC | SPAR_VARNUM},
  };
  * \endcode
  *
  * The first value gives the name of the parameter.
index 0936f2ec3febd9b4521497d7ef2446d221220b42..c694920486de3bdeb25e63552ce87ab1b0f044ad 100644 (file)
@@ -91,33 +91,33 @@ namespace gmx
  *
  * Intended use:
  * \code
-// In exampleclass.h
-class ExampleClass
-{
-    public:
-        ExampleClass();
-        ~ExampleClass(); // Must not be defined inline
+   // In exampleclass.h
+   class ExampleClass
+   {
+       public:
+           ExampleClass();
+           ~ExampleClass(); // Must not be defined inline
 
-        // <...>
+           // <...>
 
-    private:
-        class Impl;
+       private:
+           class Impl;
 
-        PrivateImplPointer<Impl> impl_;
-};
+           PrivateImplPointer<Impl> impl_;
+   };
 
-// In exampleclass.cpp
+   // In exampleclass.cpp
 
-// <definition of ExampleClass::Impl>
+   // <definition of ExampleClass::Impl>
 
-ExampleClass::ExampleClass()
-    : impl_(new Impl)
-{
-}
+   ExampleClass::ExampleClass()
+       : impl_(new Impl)
+   {
+   }
 
-ExampleClass::~ExampleClass()
-{
-}
+   ExampleClass::~ExampleClass()
+   {
+   }
  * \endcode
  * \inlibraryapi
  * \ingroup module_utility
index 7448835a61531337e4855df9b96f0b89add42e92..23bad0dabbe16a32fc526927924fac01fd57e03e 100644 (file)
@@ -339,10 +339,10 @@ class NotImplementedError : public APIError
  *
  * Basic usage:
  * \code
-if (value < 0)
-{
-    GMX_THROW(InconsistentUserInput("Negative values not allowed for value"));
-}
+   if (value < 0)
+   {
+       GMX_THROW(InconsistentUserInput("Negative values not allowed for value"));
+   }
  * \endcode
  */
 #define GMX_THROW(e) \
@@ -365,11 +365,11 @@ if (value < 0)
  *
  * Typical usage (note that gmx::File wraps this particular case):
  * \code
-FILE *fp = fopen("filename.txt", "r");
-if (fp == NULL)
-{
-    GMX_THROW(FileIOError("Could not open file"), "fopen", errno);
-}
+   FILE *fp = fopen("filename.txt", "r");
+   if (fp == NULL)
+   {
+       GMX_THROW(FileIOError("Could not open file"), "fopen", errno);
+   }
  * \endcode
  */
 #define GMX_THROW_WITH_ERRNO(e, syscall, err) \
@@ -387,20 +387,20 @@ if (fp == NULL)
  *
  * Normal usage in Gromacs command-line programs is like this:
  * \code
-int main(int argc, char *argv[])
-{
-    gmx::ProgramInfo::init(argc, argv);
-    try
-    {
-        // The actual code for the program
-        return 0;
-    }
-    catch (const std::exception &ex)
-    {
-        gmx::printFatalErrorMessage(stderr, ex);
-        return 1;
-    }
-}
+   int main(int argc, char *argv[])
+   {
+       gmx::ProgramInfo::init(argc, argv);
+       try
+       {
+           // The actual code for the program
+           return 0;
+       }
+       catch (const std::exception &ex)
+       {
+           gmx::printFatalErrorMessage(stderr, ex);
+           return 1;
+       }
+   }
  * \endcode
  */
 void printFatalErrorMessage(FILE *fp, const std::exception &ex);
@@ -428,11 +428,11 @@ int translateException(const std::exception &ex);
  *
  * Usage:
  * \code
-try
-{
-    // C++ code
-}
-GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+   try
+   {
+       // C++ code
+   }
+   GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
  * \endcode
  *
  * \inlibraryapi
index 68869c5aa768681ff9255152b687190dbd12fba9..a77d1919fa4d50b167d07a13ace15db82a04132f 100644 (file)
@@ -132,13 +132,13 @@ class File
          * Terminating newline will be present in \p line if it was present in
          * the file.
          * To loop over all lines in the file, use:
-\code
-std::string line;
-while (file.readLine(&line))
-{
-    // ...
-}
-\endcode
+         * \code
+           std::string line;
+           while (file.readLine(&line))
+           {
+               // ...
+           }
+         * \endcode
          */
         bool readLine(std::string *line);
 
index 05f08fc4ef57f5ba1e3751e2ab34f72ea00202f4..62824304911f1f1926307d0f5395378d85cc3bcc 100644 (file)
@@ -127,14 +127,14 @@ class MessageStringCollector
  *
  * Example usage:
  * \code
-bool function(::gmx::MessageStringCollector *errors)
-{
-    ::gmx::MessageStringContext errcontext(errors, "In function()");
-    bool bOk = function2(errors);
-    bOk = function3(errors) && bOk;
-    // <more processing>
-    return bOk;
-}
+   bool function(::gmx::MessageStringCollector *errors)
+   {
+       ::gmx::MessageStringContext errcontext(errors, "In function()");
+       bool bOk = function2(errors);
+       bOk = function3(errors) && bOk;
+       // <more processing>
+       return bOk;
+   }
  * \endcode
  *
  * \see MessageStringCollector
index 417ea2fce2ff7bf9d1c5bc1d6b6b5a3aafb01914..fd073b7a9a5861e723e4b7e5348d3f0d6f6a4d66 100644 (file)
@@ -333,9 +333,9 @@ class TextLineWrapperSettings
  *
  * Typical usage:
  * \code
-gmx::TextLineWrapper wrapper;
-wrapper.settings().setLineLength(78);
-printf("%s\n", wrapper.wrapToString(textToWrap).c_str());
+   gmx::TextLineWrapper wrapper;
+   wrapper.settings().setLineLength(78);
+   printf("%s\n", wrapper.wrapToString(textToWrap).c_str());
  * \endcode
  *
  * \inpublicapi
@@ -395,20 +395,20 @@ class TextLineWrapper
          * space.
          *
          * To iterate over lines in a string, use the following code:
-\code
-gmx::TextLineWrapper wrapper;
-// <set desired wrapping settings>
-size_t lineStart = 0;
-size_t length = input.length();
-while (lineStart < length)
-{
-    size_t nextLineStart = wrapper.findNextLine(input, lineStart);
-    std::string line = wrapper.formatLine(input, lineStart, nextLineStart));
-    // <do something with the line>
-    lineStart = nextLineStart;
-}
-return result;
-\endcode
+         * \code
+           gmx::TextLineWrapper wrapper;
+           // <set desired wrapping settings>
+           size_t lineStart = 0;
+           size_t length = input.length();
+           while (lineStart < length)
+           {
+               size_t nextLineStart = wrapper.findNextLine(input, lineStart);
+               std::string line = wrapper.formatLine(input, lineStart, nextLineStart));
+               // <do something with the line>
+               lineStart = nextLineStart;
+           }
+           return result;
+         * \endcode
          *
          * Does not throw.
          */
index a54c44973a4a655ca7f4989be29c2d7fd9ee6e37..30f97df148326c93fbc2cb4dea0948da61623376 100644 (file)
@@ -63,7 +63,7 @@ namespace gmx
  *
  * Avoid using directly as a type, use a typedef instead. Typical usage:
  * \code
-typedef gmx_unique_ptr<ExampleClass>::type ExampleClassPointer;
+   typedef gmx_unique_ptr<ExampleClass>::type ExampleClassPointer;
  * \endcode
  *
  * \ingroup module_utility
index 558af2686759ab7fe3f200d6276e441eaecac27e..2ea5aac6233a3fc9c6a97556681e9aa7ff56315d 100644 (file)
@@ -136,20 +136,21 @@ class TestReferenceChecker;
  *
  * Simple example (using Google Test):
  * \code
-int functionToTest(int param);
+   int functionToTest(int param);
 
-TEST(MyTest, SimpleTest)
-{
-    gmx::test::TestReferenceData data;
+   TEST(MyTest, SimpleTest)
+   {
+       gmx::test::TestReferenceData data;
 
-    gmx::test::TestReferenceChecker checker(data.rootChecker());
-    checker.checkInteger(functionToTest(3), "ValueWith3");
-    checker.checkInteger(functionToTest(5), "ValueWith5");
-    gmx::test::TestReferenceChecker compound(checker.startCompound("CustomCompound", "Item"));
-    compound.checkInteger(function2ToTest(3), "ValueWith3");
-    compound.checkInteger(function2ToTest(5), "ValueWith5");
-    checker.checkInteger(functionToTest(4), "ValueWith4");
-}
+       gmx::test::TestReferenceChecker checker(data.rootChecker());
+       checker.checkInteger(functionToTest(3), "ValueWith3");
+       checker.checkInteger(functionToTest(5), "ValueWith5");
+       gmx::test::TestReferenceChecker compound(
+               checker.startCompound("CustomCompound", "Item"));
+       compound.checkInteger(function2ToTest(3), "ValueWith3");
+       compound.checkInteger(function2ToTest(5), "ValueWith5");
+       checker.checkInteger(functionToTest(4), "ValueWith4");
+   }
  * \endcode
  *
  * If rootChecker() is never called, no comparison is done (i.e., missing
@@ -250,12 +251,12 @@ class TestReferenceChecker
          *
          * The main use of this method is to assign meaning for missing
          * reference data.  Example use:
-\code
-if (checker.checkPresent(bHaveVelocities, "Velocities"))
-{
-    // <check the velocities>
-}
-\endcode
+         * \code
+           if (checker.checkPresent(bHaveVelocities, "Velocities"))
+           {
+               // <check the velocities>
+           }
+         * \endcode
          */
         bool checkPresent(bool bPresent, const char *id);
 
index dfd339f87e158ac3de09c87ef4892a7556964a13..b4532728b0f6b782bcce4860d1700b73ffde2b43 100644 (file)
@@ -95,14 +95,14 @@ class TestException : public GromacsException
  *
  * Typical usage in test code:
  * \code
-try
-{
-    // some code that may throw a GromacsException
-}
-catch (const GromacsException &ex)
-{
-    GMX_THROW_WRAPPER_TESTEXCEPTION(ex);
-}
+   try
+   {
+       // some code that may throw a GromacsException
+   }
+   catch (const GromacsException &ex)
+   {
+       GMX_THROW_WRAPPER_TESTEXCEPTION(ex);
+   }
  * \endcode
  */
 #define GMX_THROW_WRAPPER_TESTEXCEPTION(e) \