A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__Tests.html below:

NCBI C++ ToolKit: Tests

#define  NCBITEST_INIT_CMDLINE(var_name)   Macro for introducing function initializing argument descriptions for tests. More...
  #define  NCBITEST_AUTO_INIT()   NCBITEST_AUTOREG_FUNCTION(eTestUserFuncInit)   Macro for introducing initialization function which will be called before tests execution and only if tests will be executed (if there's no command line parameter -dryrun or –do_not_test) even if only select number of tests will be executed (if command line parameter –run_test=... More...
  #define  NCBITEST_AUTO_FINI()   NCBITEST_AUTOREG_FUNCTION(eTestUserFuncFini)   Macro for introducing finalization function which will be called after actual tests execution even if only select number of tests will be executed (if command line parameter –run_test=... More...
  #define  NCBITEST_INIT_VARIABLES(var_name)   Macro for introducing function which should initialize configuration conditions parser. More...
  #define  NCBITEST_INIT_TREE()   NCBITEST_AUTOREG_FUNCTION(eTestUserFuncDeps)   Macro for introducing function which should initialize dependencies between test units and some hard coded (not taken from configuration file) tests disablings. More...
  #define  NCBITEST_DISABLE(test_name)    NcbiTestDisable(NcbiTestGetUnit(BOOST_STRINGIZE(test_name)))   Unconditionally disable test case. More...
  #define  NCBITEST_DEPENDS_ON(test_name, dep_name)   Add dependency between test test_name and dep_name. More...
  #define  NCBITEST_DEPENDS_ON_N(test_name, N, dep_names_array)   Add dependency between test test_name and several other tests which names given in the list dep_names_array. More...
  #define  NCBITEST_ADD_TEST_CASE(function)   Set of macros to manually add test cases that cannot be created using BOOST_AUTO_TEST_CASE. More...
  #define  NCBITEST_ADD_TEST_CASE1(function, param1)   #define  NCBITEST_ADD_TEST_CASE2(function, param1, param2)   #define  NCBITEST_ADD_TEST_CASE3(function, param1, param2, param3)   #define  NCBITEST_DEPENDS_ON_N_IMPL(z, n, names_array)   Helper macro to implement NCBI_TEST_DEPENDS_ON_N. More...
  #define  NCBITEST_AUTOREG_FUNC(type)    BOOST_JOIN(BOOST_JOIN(Ncbi_, type), __LINE__)   Helper macros for unique identifiers. More...
  #define  NCBITEST_AUTOREG_OBJ   BOOST_JOIN(NcbiTestAutoObj, __LINE__)   #define  NCBITEST_AUTOREG_HELPER   BOOST_JOIN(NcbiTestAutoHelper, __LINE__)   #define  NCBITEST_AUTOREG_FUNCTION(type)   #define  NCBITEST_AUTOREG_PARAMFUNC(type, param_decl, param_func)   void  NcbiTestSetGlobalDisabled (void)   Disable execution of all tests in current configuration. More...
  void  NcbiTestSetGlobalSkipped (void)   Skip execution of all tests in current configuration. More...
  CNcbiApplicationNcbiTestGetAppInstance (void)   Return current application instance. More...
  CNcbiRegistryNcbiTestGetRWConfig (void)   Wrapper to get the application's configuration parameters, accessible to read-write. More...
  void  NcbiTestDependsOn (boost::unit_test::test_unit *tu, boost::unit_test::test_unit *dep_tu)   Mark test case/suite as dependent on another test case/suite. More...
  void  NcbiTestDisable (boost::unit_test::test_unit *tu)   Disable test unit. More...
  void  RegisterNcbiTestUserFunc (TNcbiTestUserFunction func, ETestUserFuncType func_type)   Registrar of all user-defined functions. More...
    SNcbiTestUserFuncReg::SNcbiTestUserFuncReg (TNcbiTestUserFunction func, ETestUserFuncType func_type)   CExprParserNcbiTestGetIniParser (void)   Get pointer to parser which will be used for evaluating conditions written in configuration file. More...
  CArgDescriptionsNcbiTestGetArgDescrs (void)   Get ArgDescriptions object which will be passed to application for parsing command line arguments. More...
  boost::unit_test::test_unit *  NcbiTestGetUnit (CTempString test_name)   Get pointer to test unit by its name which can be partial, i.e. More...
    SNcbiTestRegistrar::SNcbiTestRegistrar (boost::unit_test::test_case *tc, boost::unit_test::counter_t exp_fail, unsigned int timeout)     SNcbiTestRegistrar::SNcbiTestRegistrar (boost::unit_test::test_case *tc, boost::unit_test::counter_t exp_fail)     SNcbiTestRegistrar::SNcbiTestRegistrar (boost::unit_test::const_string ts_name)     SNcbiTestRegistrar::SNcbiTestRegistrar (boost::unit_test::test_unit_generator const &tc_gen)     SNcbiTestRegistrar::SNcbiTestRegistrar (int n)     SNcbiTestTCTimeout< T >::SNcbiTestTCTimeout ()     SNcbiTestTCTimeout< T >::SNcbiTestTCTimeout (unsigned int v)   static SNcbiTestTCTimeout *&  SNcbiTestTCTimeout< T >::instance ()   unsigned int  SNcbiTestTCTimeout< T >::value () const     CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::CNcbiTestParamTestCaseGenerator (TTestFunc const &test_func, boost::unit_test::const_string name, ParamIter par_begin, ParamIter par_end)   virtual  CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::~CNcbiTestParamTestCaseGenerator ()   virtual boost::unit_test::test_unit *  CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::next () const   template<typename ParamType , typename ParamIter > CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >  NcbiTestGenTestCases (typename CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::TTestFunc const &test_func, boost::unit_test::const_string name, ParamIter par_begin, ParamIter par_end)   Helper functions to be used in BOOST_PARAM_TEST_CASE macro to create special test case generator. More...
  template<typename ParamType , typename ParamIter > CNcbiTestParamTestCaseGenerator< typename boost::remove_const< typename boost::remove_reference< ParamType >::type >::type, ParamIter >  NcbiTestGenTestCases (void(*test_func)(ParamType), boost::unit_test::const_string name, ParamIter par_begin, ParamIter par_end)   static CNcbiTestMemoryCleanupListCNcbiTestMemoryCleanupList::GetInstance ()     CNcbiTestMemoryCleanupList::~CNcbiTestMemoryCleanupList ()   void  CNcbiTestMemoryCleanupList::Add (void *ptr)   ◆ NCBITEST_ADD_TEST_CASE #define NCBITEST_ADD_TEST_CASE (   function ) Value:

boost::unit_test::framework::master_test_suite().add( \

boost::unit_test::make_test_case( \

boost::bind(function), \

BOOST_TEST_STRINGIZE(function) \

) )

Set of macros to manually add test cases that cannot be created using BOOST_AUTO_TEST_CASE.

To create such test cases you should have a function (that can accept up to 3 parameters) and use one of macros below inside NCBITEST_INIT_TREE() function. All function parameters are passed by value.

See also
NCBITEST_INIT_TREE, BOOST_AUTO_PARAM_TEST_CASE

Definition at line 970 of file test_boost.hpp.

◆ NCBITEST_ADD_TEST_CASE1 #define NCBITEST_ADD_TEST_CASE1 (   function,   param1  ) Value:

boost::unit_test::framework::master_test_suite().add( \

boost::unit_test::make_test_case( \

boost::bind(function, (param1)), \

BOOST_TEST_STRINGIZE(function) \

) )

Definition at line 976 of file test_boost.hpp.

◆ NCBITEST_ADD_TEST_CASE2 #define NCBITEST_ADD_TEST_CASE2 (   function,   param1,   param2  ) Value:

boost::unit_test::framework::master_test_suite().add( \

boost::unit_test::make_test_case( \

boost::bind(function, (param1), (param2)), \

BOOST_TEST_STRINGIZE(function) \

) )

Definition at line 982 of file test_boost.hpp.

◆ NCBITEST_ADD_TEST_CASE3 #define NCBITEST_ADD_TEST_CASE3 (   function,   param1,   param2,   param3  ) Value:

boost::unit_test::framework::master_test_suite().add( \

boost::unit_test::make_test_case( \

boost::bind(function, (param1), (param2), (param3)), \

BOOST_TEST_STRINGIZE(function) \

) )

Definition at line 988 of file test_boost.hpp.

◆ NCBITEST_AUTO_FINI

Macro for introducing finalization function which will be called after actual tests execution even if only select number of tests will be executed (if command line parameter –run_test=...

were given). The usage of this macro:

NCBITEST_AUTO_FINI()
{
    // finalization function body
}

Arbitrary number of finalization functions can be defined. They all will be called after tests are executed but the order of these callings is not defined.

See also
NCBITEST_AUTO_INIT

Definition at line 857 of file test_boost.hpp.

◆ NCBITEST_AUTO_INIT

Macro for introducing initialization function which will be called before tests execution and only if tests will be executed (if there's no command line parameter -dryrun or –do_not_test) even if only select number of tests will be executed (if command line parameter –run_test=...

were given). If any of these initialization functions will throw an exception then tests will not be executed. The usage of this macro:

NCBITEST_AUTO_INIT()
{
    // initialization function body
}

Arbitrary number of initialization functions can be defined. They all will be called before tests but the order of these callings is not defined.

See also
NCBITEST_AUTO_FINI

Definition at line 839 of file test_boost.hpp.

◆ NCBITEST_AUTOREG_FUNC #define NCBITEST_AUTOREG_FUNC (   type )     BOOST_JOIN(BOOST_JOIN(Ncbi_, type), __LINE__) ◆ NCBITEST_AUTOREG_FUNCTION #define NCBITEST_AUTOREG_FUNCTION (   type ) Value:

static ::NCBI_NS_NCBI::SNcbiTestUserFuncReg \

#define NCBITEST_AUTOREG_FUNC(type)

Helper macros for unique identifiers.

Definition at line 1121 of file test_boost.hpp.

◆ NCBITEST_AUTOREG_HELPER #define NCBITEST_AUTOREG_HELPER   BOOST_JOIN(NcbiTestAutoHelper, __LINE__)

Definition at line 1119 of file test_boost.hpp.

◆ NCBITEST_AUTOREG_OBJ #define NCBITEST_AUTOREG_OBJ   BOOST_JOIN(NcbiTestAutoObj, __LINE__)

Definition at line 1118 of file test_boost.hpp.

◆ NCBITEST_AUTOREG_PARAMFUNC #define NCBITEST_AUTOREG_PARAMFUNC (   type,   param_decl,   param_func  ) Value:

{ \

NCBITEST_AUTOREG_FUNC(

type

)(::NCBI_NS_NCBI::param_func()); \

} \

static ::NCBI_NS_NCBI::SNcbiTestUserFuncReg \

#define NCBITEST_AUTOREG_HELPER

Definition at line 1127 of file test_boost.hpp.

◆ NCBITEST_DEPENDS_ON #define NCBITEST_DEPENDS_ON (   test_name,   dep_name  ) Value:

static char test_name[128]

void NcbiTestDependsOn(boost::unit_test::test_unit *tu, boost::unit_test::test_unit *dep_tu)

Mark test case/suite as dependent on another test case/suite.

boost::unit_test::test_unit * NcbiTestGetUnit(CTempString test_name)

Get pointer to test unit by its name which can be partial, i.e.

Add dependency between test test_name and dep_name.

This dependency means if test dep_name is failed during execution or was disabled by any reason then test test_name will not be executed (will be skipped). To be used inside function introduced by NCBITEST_INIT_TREE.

Parameters
test_name Name of the test as a bare text without quotes. Name can exclude test_ prefix if function name includes one and class prefix if it is class member test case. dep_name Name of the test to depend on. Name can be given with the same assumptions as test_name.
See also
NCBITEST_INIT_TREE, NCBI_TEST_DEPENDS_ON_N

Definition at line 930 of file test_boost.hpp.

◆ NCBITEST_DEPENDS_ON_N #define NCBITEST_DEPENDS_ON_N (   test_name,   N,   dep_names_array  ) Value:

BOOST_PP_TUPLE_REM(

N

) dep_names_array))) \

(void)0

#define NCBITEST_DEPENDS_ON_N_IMPL(z, n, names_array)

Helper macro to implement NCBI_TEST_DEPENDS_ON_N.

Add dependency between test test_name and several other tests which names given in the list dep_names_array.

This dependency means if any of the tests in list dep_names_array is failed during execution or was disabled by any reason then test test_name will not be executed (will be skipped). To be used inside function introduced by NCBITEST_INIT_TREE. Macro is equivalent to use NCBI_TEST_DEPENDS_ON several times for each test in dep_names_array.

Parameters
test_name Name of the test as a bare text without quotes. Name can exclude test_ prefix if function name includes one and class prefix if it is class member test case. N Number of tests in dep_names_array dep_names_array Names of tests to depend on. Every name can be given with the same assumptions as test_name. Array should be given enclosed in parenthesis like (test_name1, ..., test_nameN) and should include exactly N elements or preprocessor error will occur during compilation.
See also
NCBITEST_INIT_TREE, NCBI_TEST_DEPENDS_ON

Definition at line 957 of file test_boost.hpp.

◆ NCBITEST_DEPENDS_ON_N_IMPL #define NCBITEST_DEPENDS_ON_N_IMPL (   z,   n,   names_array  ) Value:

BOOST_PP_ARRAY_ELEM(BOOST_PP_INC(

n

), names_array));

#define NCBITEST_DEPENDS_ON(test_name, dep_name)

Add dependency between test test_name and dep_name.

Helper macro to implement NCBI_TEST_DEPENDS_ON_N.

Definition at line 1045 of file test_boost.hpp.

◆ NCBITEST_DISABLE

Unconditionally disable test case.

To be used inside function introduced by NCBITEST_INIT_TREE.

Parameters
test_name Name of the test as a bare text without quotes. Name can exclude test_ prefix if function name includes one and class prefix if it is class member test case.
See also
NCBITEST_INIT_TREE

Definition at line 911 of file test_boost.hpp.

◆ NCBITEST_INIT_CMDLINE #define NCBITEST_INIT_CMDLINE (   var_name ) Value:

#define NCBITEST_AUTOREG_PARAMFUNC(type, param_decl, param_func)

CArgDescriptions * NcbiTestGetArgDescrs(void)

Get ArgDescriptions object which will be passed to application for parsing command line arguments.

Macro for introducing function initializing argument descriptions for tests.

This function will be called before CNcbiApplication will parse command line arguments. So it will parse command line using descriptions set by this function. Also test framework will react correctly on such arguments as -h, -help or -dryrun (the last will just print list of unit tests without actually executing them). The parameter var_name is a name for variable of type CArgDescriptions* that can be used inside function to set up argument descriptions. Usage of this macro is like this:

NCBITEST_INIT_CMDLINE(my_args)
{
    my_args->SetUsageContext(...);
    my_args->AddPositional(...);
}

Definition at line 817 of file test_boost.hpp.

◆ NCBITEST_INIT_TREE ◆ NCBITEST_INIT_VARIABLES #define NCBITEST_INIT_VARIABLES (   var_name ) Value:

CExprParser * NcbiTestGetIniParser(void)

Get pointer to parser which will be used for evaluating conditions written in configuration file.

Macro for introducing function which should initialize configuration conditions parser.

This parser will be used to evaluate conditions for running tests written in configuration file. So you should set values for all variables that you want to participate in those expressions. Test framework automatically adds all OS*, COMPILER* and DLL_BUILD variables with the values of analogous NCBI_OS*, NCBI_COMPILER* and NCBI_DLL_BUILD macros. The usage of this macro:

NCBITEST_INIT_VARIABLES(my_parser)
{
   my_parser->AddSymbol("var_name1", value_expr1);
   my_parser->AddSymbol("var_name2", value_expr2);
}

Arbitrary number of such functions can be defined.

Definition at line 875 of file test_boost.hpp.

◆ TNcbiTestUserFunction typedef void(* TNcbiTestUserFunction) (void)

Type of user-defined function which will be automatically registered in test framework.

Definition at line 1074 of file test_boost.hpp.

◆ TParent ◆ TTestFunc

template<typename ParamType , typename ParamIter >

Definition at line 1227 of file test_boost.hpp.

◆ ETestUserFuncType

Types of functions that user can define.

Enumerator eTestUserFuncInit  eTestUserFuncFini  eTestUserFuncCmdLine  eTestUserFuncVars  eTestUserFuncDeps  eTestUserFuncFirst  eTestUserFuncLast 

Definition at line 1077 of file test_boost.hpp.

◆ Add() void CNcbiTestMemoryCleanupList::Add ( void *  ptr ) ◆ CNcbiTestParamTestCaseGenerator()

template<typename ParamType , typename ParamIter >

◆ GetInstance() ◆ instance() ◆ NcbiTestDependsOn() void NcbiTestDependsOn ( boost::unit_test::test_unit *  tu, boost::unit_test::test_unit *  dep_tu  )

Mark test case/suite as dependent on another test case/suite.

If dependency test case didn't executed successfully for any reason then dependent test will not be executed. This rule has one exception: if test is requested to execute in command line via parameter "--run_test" and dependency was not requested to execute, requested test will be executed anyways.

Parameters
tu Test case/suite that should be marked as dependent dep_tu Test case/suite that will be "parent" for tu
◆ NcbiTestDisable() void NcbiTestDisable ( boost::unit_test::test_unit *  tu )

Disable test unit.

Disabled test unit will not be executed (as if p_enabled is set to false) but it will be reported in final Boost.Test report as disabled (as opposed to setting p_enabled to false when test does not appear in final Boost.Test report).

◆ NcbiTestGenTestCases() [1/2]

template<typename ParamType , typename ParamIter >

Helper functions to be used in BOOST_PARAM_TEST_CASE macro to create special test case generator.

Definition at line 1281 of file test_boost.hpp.

◆ NcbiTestGenTestCases() [2/2]

template<typename ParamType , typename ParamIter >

CNcbiTestParamTestCaseGenerator< typename boost::remove_const< typename boost::remove_reference<ParamType>::type >::type, ParamIter> NcbiTestGenTestCases ( void(*)(ParamType)  test_func, boost::unit_test::const_string  name, ParamIter  par_begin, ParamIter  par_end  ) inline ◆ NcbiTestGetAppInstance() ◆ NcbiTestGetArgDescrs()

Get ArgDescriptions object which will be passed to application for parsing command line arguments.

Definition at line 2209 of file test_boost.cpp.

◆ NcbiTestGetIniParser()

Get pointer to parser which will be used for evaluating conditions written in configuration file.

Definition at line 2203 of file test_boost.cpp.

◆ NcbiTestGetRWConfig() ◆ NcbiTestGetUnit() boost::unit_test::test_unit* NcbiTestGetUnit ( CTempString  test_name )

Get pointer to test unit by its name which can be partial, i.e.

without class prefix and/or test_ prefix if any. Throws an exception in case of name of non-existent test

Definition at line 2215 of file test_boost.cpp.

◆ NcbiTestSetGlobalDisabled() void NcbiTestSetGlobalDisabled ( void  ) ◆ NcbiTestSetGlobalSkipped() void NcbiTestSetGlobalSkipped ( void  ) ◆ next()

template<typename ParamType , typename ParamIter >

Definition at line 1245 of file test_boost.hpp.

References NStr::IntToString(), CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::m_CaseIndex, CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::m_Name, CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::m_ParBegin, CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::m_ParEnd, CNcbiTestParamTestCaseGenerator< ParamType, ParamIter >::m_TestFunc, and NULL.

◆ RegisterNcbiTestUserFunc() ◆ SNcbiTestRegistrar() [1/5] SNcbiTestRegistrar::SNcbiTestRegistrar ( boost::unit_test::const_string  ts_name ) inlineexplicit

Definition at line 1169 of file test_boost.hpp.

◆ SNcbiTestRegistrar() [2/5] SNcbiTestRegistrar::SNcbiTestRegistrar ( boost::unit_test::test_case *  tc, boost::unit_test::counter_t  exp_fail  ) inline

Definition at line 1162 of file test_boost.hpp.

◆ SNcbiTestRegistrar() [3/5] SNcbiTestRegistrar::SNcbiTestRegistrar ( boost::unit_test::test_case *  tc, boost::unit_test::counter_t  exp_fail, unsigned int  timeout  ) inline

Definition at line 1144 of file test_boost.hpp.

◆ SNcbiTestRegistrar() [4/5] SNcbiTestRegistrar::SNcbiTestRegistrar ( boost::unit_test::test_unit_generator consttc_gen ) inlineexplicit

Definition at line 1175 of file test_boost.hpp.

◆ SNcbiTestRegistrar() [5/5] SNcbiTestRegistrar::SNcbiTestRegistrar ( int  n ) inlineexplicit

Definition at line 1180 of file test_boost.hpp.

◆ SNcbiTestTCTimeout() [1/2] ◆ SNcbiTestTCTimeout() [2/2] ◆ SNcbiTestUserFuncReg() ◆ value() ◆ ~CNcbiTestMemoryCleanupList() CNcbiTestMemoryCleanupList::~CNcbiTestMemoryCleanupList ( ) ◆ ~CNcbiTestParamTestCaseGenerator()

template<typename ParamType , typename ParamIter >

Definition at line 1243 of file test_boost.hpp.

◆ g_NcbiTestMutex CAutoInitializeStaticFastMutex g_NcbiTestMutex extern

Definition at line 162 of file test_boost.cpp.

◆ m_CaseIndex

template<typename ParamType , typename ParamIter >

◆ m_List std::list<void*> CNcbiTestMemoryCleanupList::m_List private ◆ m_Name

template<typename ParamType , typename ParamIter >

◆ m_ParBegin

template<typename ParamType , typename ParamIter >

◆ m_ParEnd

template<typename ParamType , typename ParamIter >

◆ m_TestFunc

template<typename ParamType , typename ParamIter >

◆ m_value

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4