With this, no Doxygen documentation in the source should get ignored.
Also added documentation for anonymous namespace members that were
causing warnings.
Related to #638.
Change-Id: I31af809272123fbc7f77ea9d3b186eddb07935bb
@CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders/thread_mpi/atomic \
@CMAKE_SOURCE_DIR@/src/gromacs/selection/scanner.cpp @NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN@
EXCLUDE_SYMBOLS = YY* yy* _gmx_sel_yy*
+EXCLUDE_SYMBOLS += TEST TEST_F TEST_P INSTANTIATE_TEST_CASE_P
+EXCLUDE_SYMBOLS += MOCK_METHOD* MOCK_CONST_METHOD*
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/src
INTERNAL_DOCS = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_ANON_NSPACES = YES
HIDE_UNDOC_CLASSES = YES
WARN_LOGFILE = doxygen-full.log
HTML_OUTPUT = html-full
}
+//! Test fixture for gmx::AnalysisData.
typedef gmx::test::AnalysisDataTestFixture AnalysisDataTest;
-// Input data for the tests below.
using gmx::test::END_OF_FRAME;
using gmx::test::MPSTOP;
-static const real inputdata[] = {
+//! Input data for gmx::AnalysisData tests.
+const real inputdata[] = {
1.0, 0.0, 1.0, 2.0, END_OF_FRAME,
2.0, 1.0, 1.0, 1.0, END_OF_FRAME,
3.0, 2.0, 0.0, 0.0, END_OF_FRAME
ASSERT_NO_THROW(presentAllData(input, &data));
}
-// Input data for the tests below.
-static const real multipointinputdata[] = {
+//! Input data for multipoint gmx::AnalysisData tests.
+const real multipointinputdata[] = {
1.0, 0.0, 1.0, 2.0, MPSTOP, 1.1, 2.1, 1.1, MPSTOP, 2.2, 1.2, 0.2, END_OF_FRAME,
2.0, 1.0, 1.0, 1.0, MPSTOP, 2.1, 1.1, 0.1, MPSTOP, 1.2, 0.2, 1.2, END_OF_FRAME,
3.0, 2.0, 0.0, 0.0, MPSTOP, 3.1, 2.1, 1.1, MPSTOP, 0.2, 2.2, 1.2, END_OF_FRAME
* Tests for gmx::AnalysisArrayData.
*/
+//! Test fixture for gmx::AnalysisArrayData.
typedef gmx::test::AnalysisDataTestFixture AnalysisArrayDataTest;
using gmx::test::END_OF_FRAME;
-static const real inputdata[] = {
+//! Input data for gmx::AnalysisArrayData tests.
+const real inputdata[] = {
1.0, 0.0, 1.0, 2.0, END_OF_FRAME,
2.0, 1.0, 1.0, 1.0, END_OF_FRAME,
3.0, 2.0, 0.0, 0.0, END_OF_FRAME,
* Tests for gmx::AnalysisDataAverageModule.
*/
+//! Test fixture for gmx::AnalysisDataAverageModule.
typedef gmx::test::AnalysisDataTestFixture AverageModuleTest;
-// Input data for the tests below.
using gmx::test::END_OF_FRAME;
-static const real inputdata[] = {
+//! Input data for gmx::AnalysisDataAverageModule tests.
+const real inputdata[] = {
1.0, 0.0, 1.0, 2.0, END_OF_FRAME,
2.0, 1.0, 1.0, 1.0, END_OF_FRAME,
3.0, 2.0, 0.0, 0.0, END_OF_FRAME
* Tests for gmx::AnalysisDataSimpleHistogramModule.
*/
+//! Test fixture for gmx::AnalysisDataSimpleHistogramModule.
typedef gmx::test::AnalysisDataTestFixture SimpleHistogramModuleTest;
-// Input data for the tests below.
using gmx::test::END_OF_FRAME;
using gmx::test::MPSTOP;
-static const real simpleinputdata[] = {
+//! Input data for gmx::AnalysisDataSimpleHistogramModule tests.
+const real simpleinputdata[] = {
1.0, 0.7, MPSTOP, 1.1, MPSTOP, 2.3, MPSTOP, 2.9, END_OF_FRAME,
2.0, 1.3, MPSTOP, 2.2, END_OF_FRAME,
3.0, 3.3, MPSTOP, 1.2, MPSTOP, 1.3, END_OF_FRAME
* Tests for gmx::AnalysisDataWeightedHistogramModule.
*/
+//! Test fixture for gmx::AnalysisDataWeightedHistogramModule.
typedef gmx::test::AnalysisDataTestFixture WeightedHistogramModuleTest;
-// Input data for the tests below (both weighted and bin average modules).
-static const real weightedinputdata[] = {
+//! Input data for both weighted histogram and bin average module tests.
+const real weightedinputdata[] = {
1.0, 0.7, 0.5, MPSTOP, 1.1, 1.0, MPSTOP, 2.3, 1.0, MPSTOP, 2.9, 2.0, END_OF_FRAME,
2.0, 1.3, 1.0, MPSTOP, 2.2, 3.0, END_OF_FRAME,
3.0, 3.3, 0.5, MPSTOP, 1.2, 2.0, MPSTOP, 1.3, 1.0, END_OF_FRAME
* Tests for gmx::AnalysisDataBinAverageModule.
*/
+//! Test fixture for gmx::AnalysisDataBinAverageModule.
typedef gmx::test::AnalysisDataTestFixture BinAverageModuleTest;
TEST_F(BinAverageModuleTest, ComputesCorrectly)
* corresponding facilities in gmx::test::AnalysisDataTestFixture.
*/
+//! Test fixture for gmx::AbstractAverageHistogram.
typedef gmx::test::AnalysisDataTestFixture AbstractAverageHistogramTest;
-// Input data for average histogram tests.
-static const real averageinputdata[] = {
+//! Input data for gmx::AbstractAverageHistogram tests.
+const real averageinputdata[] = {
1.0, 2.0, 1.0, END_OF_FRAME,
1.5, 1.0, 1.0, END_OF_FRAME,
2.0, 3.0, 2.0, END_OF_FRAME,
{
public:
MockAverageHistogram() {}
+ //! Creates a histogram module with defined bin parameters.
explicit MockAverageHistogram(const gmx::AnalysisHistogramSettings &settings)
: AbstractAverageHistogram(settings)
{
namespace
{
-static const real inputdata[] = { //print ",\n".join([",".join(["%4s"%(random.randint(-99,99)/10.,) for i in range(25)]) for j in range(20)])
+//! Input data for FFT tests.
+const real inputdata[] = { //print ",\n".join([",".join(["%4s"%(random.randint(-99,99)/10.,) for i in range(25)]) for j in range(20)])
-3.5, 6.3, 1.2, 0.3, 1.1,-5.7, 5.8,-1.9,-6.3,-1.4, 7.4, 2.4,-9.9,-7.2, 5.4, 6.1,-1.9,-7.6, 1.4,-3.5, 0.7, 5.6,-4.2,-1.1,-4.4,
-6.3,-7.2, 4.6,-3.0,-0.9, 7.2, 2.5,-3.6, 6.1,-3.2,-2.1, 6.5,-0.4,-9.0, 2.3, 8.4, 4.0,-5.2,-9.0, 4.7,-3.7,-2.0,-9.5,-3.9,-3.6,
7.1, 0.8,-0.6, 5.2,-9.3,-4.5, 5.9, 2.2,-5.8, 5.0, 1.2,-0.1, 2.2, 0.2,-7.7, 1.9,-8.4, 4.4, 2.3,-2.9, 6.7, 2.7, 5.8,-3.6, 8.9,
}
protected:
- //! \copydoc AbstractSimpleHelpTopic::helpText()
+ //! \copydoc gmx::AbstractSimpleHelpTopic::helpText()
virtual std::string helpText() const = 0;
/*! \brief
namespace
{
+//! Simple test string for wrapping.
const char g_wrapText[] = "A quick brown fox jumps over the lazy dog";
+//! Test string for wrapping with embedded line breaks.
const char g_wrapText2[] = "A quick brown fox jumps\nover the lazy dog";
/********************************************************************
* Tests for HelpManager
*/
+//! Test fixture for gmx::HelpManager.
typedef HelpTestBase HelpManagerTest;
TEST_F(HelpManagerTest, HandlesRootTopic)
virtual void clearSet();
- /*! \copydoc AbstractOptionStorage::convertValue()
+ /*! \copydoc gmx::AbstractOptionStorage::convertValue()
*
* Derived classes should call addValue() after they have converted
* \p value to the storage type. It is allowed to call addValue()
namespace
{
+/*! \brief
+ * Reads a single selection line from stdin.
+ *
+ * \param[in] infile File to read from (typically File::standardInput()).
+ * \param[in] bInteractive Whether to print interactive prompts.
+ * \param[out] line The read line in stored here.
+ * \returns true if something was read, false if at end of input.
+ *
+ * Handles line continuation, reading also the continuing line(s) in one call.
+ */
bool promptLine(File *infile, bool bInteractive, std::string *line)
{
if (bInteractive)
{
fprintf(stderr, "\n");
}
- return line;
+ return true;
}
+/*! \brief
+ * Helper function for tokenizing the input and pushing them to the parser.
+ *
+ * \param scanner Tokenizer data structure.
+ * \param parserState Parser data structure.
+ * \param[in] bInteractive Whether to operate in interactive mode.
+ *
+ * Repeatedly reads tokens using \p scanner and pushes them to the parser with
+ * \p parserState until there is no more input, or until enough input is given
+ * (only in interactive mode).
+ */
int runParserLoop(yyscan_t scanner, _gmx_sel_yypstate *parserState,
bool bInteractive)
{
{
break;
}
+ // Empty commands cause the interactive parser to print out
+ // status information. This avoids producing those unnecessarily,
+ // e.g., from "resname RA;;".
if (prevToken == CMD_SEP && token == CMD_SEP)
{
continue;
* Tests for SelectionOption
*/
+//! Test fixture for gmx::SelectionOption.
typedef SelectionOptionTestBase SelectionOptionTest;
TEST_F(SelectionOptionTest, ParsesSimpleSelection)
//! Sets the file name to write the index file to.
void setFileName(const std::string &fnm);
+ /*! \brief
+ * Adds information about a group to be printed.
+ *
+ * Must be called for each group present in the input data.
+ */
void addGroup(const std::string &name, bool bDynamic);
virtual int flags() const;
if (points.firstColumn() == 0)
{
++currentGroup_;
+ GMX_RELEASE_ASSERT(currentGroup_ < static_cast<int>(groups_.size()),
+ "Too few groups initialized");
if (bFirstFrame || groups_[currentGroup_].bDynamic)
{
if (!bFirstFrame || currentGroup_ > 0)
* Tests for gmx::analysismodules::Select.
*/
+//! Test fixture for the select analysis module.
typedef gmx::test::TrajectoryAnalysisModuleTestFixture<gmx::analysismodules::Select>
SelectModuleTest;
namespace
{
+/*! \brief
+ * Prints error information for an exception object.
+ *
+ * \param[in] fp File to write the information out to (typically stderr).
+ * \param[in] ex Exception object to print.
+ * \param[in] indent Indentation for the information.
+ *
+ * If the exception contains nested exceptions, information from them is
+ * recursively printed.
+ */
void printExceptionMessage(FILE *fp, const std::exception &ex, int indent)
{
const boost::exception *boostEx = dynamic_cast<const boost::exception *>(&ex);
namespace
{
+//! Mutex for updates to the global program info objects.
tMPI::mutex g_programInfoMutex;
//! Partially filled program info, needed to support set_program_name().
boost::scoped_ptr<ProgramInfo> g_partialProgramInfo;
+//! Global program info; stores the object initialized with ProgramInfo::init().
boost::scoped_ptr<ProgramInfo> g_programInfo;
} // namespace
namespace
{
+/*! \brief
+ * Common implementation for string replacement functions.
+ *
+ * \param[in] input Input string.
+ * \param[in] from String to find.
+ * \param[in] to String to use to replace \p from.
+ * \param[in] bWholeWords Whether to only consider matches to whole words.
+ * \returns \p input with all occurrences of \p from replaced with \p to.
+ * \throws std::bad_alloc if out of memory.
+ */
std::string
replaceInternal(const std::string &input, const char *from, const char *to,
bool bWholeWords)
* Tests for concatenateStrings()
*/
+//! Test fixture for gmx::concatenateStrings().
typedef gmx::test::StringTestBase ConcatenateStringsTest;
TEST_F(ConcatenateStringsTest, HandlesDifferentStringEndings)
//! Test string for wrapping with extra whitespace.
const char g_wrapTextWhitespace[] = " A quick brown fox jumps \n over the lazy dog";
+//! Test fixture for gmx::TextLineWrapper.
typedef gmx::test::StringTestBase TextLineWrapperTest;
TEST_F(TextLineWrapperTest, HandlesEmptyStrings)
namespace
{
+/*! \brief
+ * Helper function for checking the data frame header against static data.
+ *
+ * \param[in] header Frame header to check.
+ * \param[in] refFrame Data to check against.
+ */
void checkHeader(const AnalysisDataFrameHeader &header,
const AnalysisDataTestInputFrame &refFrame)
{
EXPECT_FLOAT_EQ(refFrame.dx(), header.dx());
}
+/*! \brief
+ * Helper function for checking a point set against static data.
+ *
+ * \param[in] points Point set to check.
+ * \param[in] refPoints Data to check against.
+ * \param[in] columnOffset Offset of first column of \p points in \p refPoints.
+ */
void checkPoints(const AnalysisDataPointSetRef &points,
const AnalysisDataTestInputPointSet &refPoints,
int columnOffset)
}
}
+/*! \brief
+ * Helper function for checking a full frame against static data.
+ *
+ * \param[in] frame Frame to check.
+ * \param[in] refFrame Data to check against.
+ */
void checkFrame(const AnalysisDataFrameRef &frame,
const AnalysisDataTestInputFrame &refFrame)
{