|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Macros for expanding code. More...


Go to the source code of this file.
Defines | |
| #define | TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME) |
| Basic unit test creation macro for non-templated code. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(TEST_GROUP, TEST_NAME, TYPE) |
| Basic unit test creation macro for templated code on one template parameter. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, TYPE) |
| Template instantiation for a single templated type. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_FLOAT(TEST_GROUP, TEST_NAME) |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_DOUBLE(TEST_GROUP, TEST_NAME) TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, double) |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_COMPLEX_FLOAT(TEST_GROUP, TEST_NAME) |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_COMPLEX_DOUBLE(TEST_GROUP, TEST_NAME) |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_REAL_SCALAR_TYPES(TEST_GROUP, TEST_NAME) |
| Instantiate a whole group of tests for supported real Scalar types. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_SCALAR_TYPES(TEST_GROUP, TEST_NAME) |
| Instantiate a whole group of tests for supported Scalar types. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL(TEST_GROUP, TEST_NAME, TYPE1, TYPE2) |
| Basic unit test creation macro for templated code on two template parameters. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2) |
| Template instantiation for two templated types. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL(TEST_GROUP, TEST_NAME, TYPE1, TYPE2, TYPE3) |
| Basic unit test creation macro for templated code on three template parameters. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2, TYPE3) |
| Template instantiation for three templated types. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TEST_GROUP, TEST_NAME, TYPE1, TYPE2, TYPE3, TYPE4) |
| Basic unit test creation macro for templated code on four template parameters. | |
| #define | TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2, TYPE3, TYPE4) |
| Template instantiation for four templated types. | |
Macros for expanding code.
Macros for helping to create concrete unit tests.
Definition in file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) |
class TEST_GROUP##_##TEST_NAME##_UnitTest : public Teuchos::UnitTestBase \ { \ public: \ TEST_GROUP##_##TEST_NAME##_UnitTest() \ : Teuchos::UnitTestBase( #TEST_GROUP, #TEST_NAME ) \ {} \ virtual void runUnitTestImpl( Teuchos::FancyOStream &out, bool &success ) const; \ virtual std::string unitTestFile() const { return __FILE__; } \ virtual long int unitTestFileLineNumber() const { return __LINE__; } \ }; \ \ TEST_GROUP##_##TEST_NAME##_UnitTest \ instance_##TEST_GROUP##_##TEST_NAME##_UnitTest; \ \ void TEST_GROUP##_##TEST_NAME##_UnitTest::runUnitTestImpl( \ Teuchos::FancyOStream &out, bool &success ) const \
Basic unit test creation macro for non-templated code.
Definition at line 60 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE | |||
| ) |
template<class TYPE> \ class TEST_GROUP##_##TEST_NAME##_UnitTest : public Teuchos::UnitTestBase \ { \ public: \ TEST_GROUP##_##TEST_NAME##_UnitTest(const std::string& typeName) \ : Teuchos::UnitTestBase( std::string(#TEST_GROUP)+"_"+typeName, #TEST_NAME ) \ {} \ void runUnitTestImpl( Teuchos::FancyOStream &out, bool &success ) const; \ virtual std::string unitTestFile() const { return __FILE__; } \ virtual long int unitTestFileLineNumber() const { return __LINE__; } \ }; \ \ template<class TYPE> \ void TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE>::runUnitTestImpl( \ Teuchos::FancyOStream &out, bool &success ) const \
Basic unit test creation macro for templated code on one template parameter.
Definition at line 84 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE | |||
| ) |
\
template class TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE>; \
TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE> \
instance_##TEST_GROUP##_##TYPE##_##TEST_NAME##_UnitTest(#TYPE);
Template instantiation for a single templated type.
Definition at line 106 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_FLOAT | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) |
Definition at line 117 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_DOUBLE | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) | TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, double) |
Definition at line 120 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_COMPLEX_FLOAT | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) |
Definition at line 128 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_COMPLEX_DOUBLE | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) |
Definition at line 136 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_REAL_SCALAR_TYPES | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) |
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_FLOAT(TEST_GROUP, TEST_NAME) \ TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_DOUBLE(TEST_GROUP, TEST_NAME)
Instantiate a whole group of tests for supported real Scalar types.
Definition at line 145 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_SCALAR_TYPES | ( | TEST_GROUP, | |
| TEST_NAME | |||
| ) |
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_FLOAT(TEST_GROUP, TEST_NAME) \ TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_DOUBLE(TEST_GROUP, TEST_NAME) \ TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_COMPLEX_FLOAT(TEST_GROUP, TEST_NAME) \ TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_COMPLEX_DOUBLE(TEST_GROUP, TEST_NAME)
Instantiate a whole group of tests for supported Scalar types.
Definition at line 154 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE1, | |||
| TYPE2 | |||
| ) |
template<class TYPE1, class TYPE2> \ class TEST_GROUP##_##TEST_NAME##_UnitTest : public Teuchos::UnitTestBase \ { \ public: \ TEST_GROUP##_##TEST_NAME##_UnitTest( \ const std::string& type1Name, \ const std::string& type2Name \ ) \ :Teuchos::UnitTestBase( \ std::string(#TEST_GROUP)+"_"+type1Name+"_"+type2Name, #TEST_NAME ) \ {} \ void runUnitTestImpl( Teuchos::FancyOStream &out, bool &success ) const; \ virtual std::string unitTestFile() const { return __FILE__; } \ virtual long int unitTestFileLineNumber() const { return __LINE__; } \ }; \ \ template<class TYPE1, class TYPE2> \ void TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1,TYPE2>::runUnitTestImpl( \ Teuchos::FancyOStream &out, bool &success ) const \
Basic unit test creation macro for templated code on two template parameters.
Definition at line 166 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE1, | |||
| TYPE2 | |||
| ) |
\
template class TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1, TYPE2 >; \
TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1, TYPE2 > \
instance_##TEST_GROUP##_##TYPE1##_##TYPE2##_##TEST_NAME##_UnitTest(#TYPE1,#TYPE2);
Template instantiation for two templated types.
Definition at line 191 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE1, | |||
| TYPE2, | |||
| TYPE3 | |||
| ) |
template<class TYPE1, class TYPE2, class TYPE3> \ class TEST_GROUP##_##TEST_NAME##_UnitTest : public Teuchos::UnitTestBase \ { \ public: \ TEST_GROUP##_##TEST_NAME##_UnitTest( \ const std::string& type1Name, \ const std::string& type2Name, \ const std::string& type3Name \ ) \ :Teuchos::UnitTestBase( \ std::string(#TEST_GROUP)+"_"+type1Name+"_"+type2Name+"_"+type3Name, #TEST_NAME ) \ {} \ void runUnitTestImpl( Teuchos::FancyOStream &out, bool &success ) const; \ virtual std::string unitTestFile() const { return __FILE__; } \ virtual long int unitTestFileLineNumber() const { return __LINE__; } \ }; \ \ template<class TYPE1, class TYPE2, class TYPE3> \ void TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1,TYPE2,TYPE3>::runUnitTestImpl( \ Teuchos::FancyOStream &out, bool &success ) const \
Basic unit test creation macro for templated code on three template parameters.
Definition at line 203 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE1, | |||
| TYPE2, | |||
| TYPE3 | |||
| ) |
\
template class TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1, TYPE2, TYPE3 >; \
TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1, TYPE2, TYPE3 > \
instance_##TEST_GROUP##_##TYPE1##_##TYPE2##_##TYPE3##_##TEST_NAME##_UnitTest(#TYPE1,#TYPE2,#TYPE3);
Template instantiation for three templated types.
Definition at line 230 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE1, | |||
| TYPE2, | |||
| TYPE3, | |||
| TYPE4 | |||
| ) |
template<class TYPE1, class TYPE2, class TYPE3, class TYPE4> \ class TEST_GROUP##_##TEST_NAME##_UnitTest : public Teuchos::UnitTestBase \ { \ public: \ TEST_GROUP##_##TEST_NAME##_UnitTest( \ const std::string& type1Name, \ const std::string& type2Name, \ const std::string& type3Name, \ const std::string& type4Name \ ) \ :Teuchos::UnitTestBase( \ std::string(#TEST_GROUP)+"_"+type1Name+"_"+type2Name+"_"+type3Name+"_"+type4Name, #TEST_NAME ) \ {} \ void runUnitTestImpl( Teuchos::FancyOStream &out, bool &success ) const; \ virtual std::string unitTestFile() const { return __FILE__; } \ virtual long int unitTestFileLineNumber() const { return __LINE__; } \ }; \ \ template<class TYPE1, class TYPE2, class TYPE3, class TYPE4> \ void TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1,TYPE2,TYPE3,TYPE4>::runUnitTestImpl( \ Teuchos::FancyOStream &out, bool &success ) const \
Basic unit test creation macro for templated code on four template parameters.
Definition at line 242 of file Teuchos_UnitTestHelpers.hpp.
| #define TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT | ( | TEST_GROUP, | |
| TEST_NAME, | |||
| TYPE1, | |||
| TYPE2, | |||
| TYPE3, | |||
| TYPE4 | |||
| ) |
\
template class TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1, TYPE2, TYPE3, TYPE4 >; \
TEST_GROUP##_##TEST_NAME##_UnitTest<TYPE1, TYPE2, TYPE3, TYPE4 > \
instance_##TEST_GROUP##_##TYPE1##_##TYPE2##_##TYPE3##_##TYPE4##_##TEST_NAME##_UnitTest(#TYPE1,#TYPE2,#TYPE3,#TYPE4);
Template instantiation for four templated types.
Definition at line 270 of file Teuchos_UnitTestHelpers.hpp.
1.7.6.1