3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
9 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
10 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
11 * Copyright (c) 2001-2009, The GROMACS development team,
12 * check out http://www.gromacs.org for more information.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * If you want to redistribute modifications, please consider that
20 * scientific software is very special. Version control is crucial -
21 * bugs must be traceable. We will be happy to consider code for
22 * inclusion in the official distribution, but derived work must not
23 * be called official GROMACS. Details are found in the README & COPYING
24 * files - if they are missing, get the official version at www.gromacs.org.
26 * To help us fund GROMACS development, we humbly ask that you cite
27 * the papers on the package - you can find them in the top README file.
29 * For more info, check our website at http://www.gromacs.org
31 /*! \libinternal \file
33 * Functions for accessing test command-line options.
35 * Functions in this header allow accessing command-line options passed to the
36 * test executable from tests. This can be used to, e.g., enable additional
37 * output for debugging purposes.
39 * \author Teemu Murtola <teemu.murtola@cbr.su.se>
41 * \ingroup module_testutils
43 #ifndef GMX_TESTUTILS_TESTOPTIONS_H
44 #define GMX_TESTUTILS_TESTOPTIONS_H
54 /*! \libinternal \brief
55 * Initializes the test utilities library.
57 * Does not throw. Terminates the program with a non-zero error code if an
60 * This function is automatically called by test_main_gtest.cpp and
61 * test_main_gmock.cpp.
63 void initTestUtils(const char *dataPath, int *argc, char *argv[]);
64 /*! \libinternal \brief
65 * Parses given options from the command line.
67 * \param[in] options Definition of options to parse.
68 * \throws std::bad_alloc if out of memory.
69 * \throws TestException if an error occurs in the parsing.
71 * This can be used from test or test fixture setup functions to initialize
72 * local variables. Although this means that the parameters are potentially
73 * parsed multiple times, the performance impact should not be significant.
77 void parseTestOptions(Options *options);