Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Macros | Typedefs | Functions
Dependencies_SerializationTests.cpp File Reference
#include "Teuchos_VerboseObject.hpp"
#include "Teuchos_XMLParameterListCoreHelpers.hpp"
#include "Teuchos_StandardDependencies.hpp"
#include "Teuchos_DependencySheet.hpp"
#include "Teuchos_StandardConditions.hpp"
#include "Teuchos_UnitTestHarness.hpp"
#include "Teuchos_DependencyXMLConverterDB.hpp"
#include "Teuchos_StandardDependencyXMLConverters.hpp"
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_XMLParameterListTestHelpers.hpp"
Include dependency graph for Dependencies_SerializationTests.cpp:

Go to the source code of this file.

Namespaces

 Teuchos
 

Macros

#define BASIC_DEPENDENCY_TEST(DEPENDENCY, DEPTYPE,NUM_DEPENDEES, NUM_DEPENDENTS)
 
#define VERIFY_DEPENDENT(DEPENDENCY, DEPENDENT)
 
#define VERIFY_DEPENDEE(DEPENDENCY, DEPENDEE)
 
#define CREATE_DEPENDEE(POSTFIX, VALUE)
 
#define CREATE_DEPENDENT(POSTFIX, VALUE)
 
#define EXCEPTION_TEST_BOILERPLATE(DEPENDEE_VAL, DEPENDENT_VAL)
 
#define CONVERT_DEP_TO_XML(DEPENDENCY)
 
#define TOO_MANY_DEPENDEE_TEST(DEPENDENCY)
 
#define COPY_DEPTAG_WITHOUT_CHILD(TAG, CHILDTAG, NEWTAG)
 
#define INSERT_VALIDATOR_TO_MAPS(VALIDATOR)
 
#define NUMBER_VIS_TEST(T)
 
#define ArrayModifierTest(DEPENDENCYTYPE, ARRAY_TYPE)
 
#define NUM_ARRAY_LENGTH_TEST(DependeeType, DependentType)
 
#define NUM_ARRAY_LENGTH_TEST_GROUP(DependeeType)
 
#define TWODROW_TEST(DependeeType, DependentType)
 
#define TWODROW_TEST_GROUP(DependeeType)
 
#define TWODCOL_TEST(DependeeType, DependentType)
 
#define TWODCOL_TEST_GROUP(DependeeType)
 
#define RANGE_VALIDATOR_TEST(T)
 

Typedefs

typedef std::string Teuchos::myString_t
 

Functions

 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, SerializationTestMacros)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringVisualDepSerialization)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolVisualDepSerialization)
 
 Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Dependencies, NumberVisualDepSerialization, T)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, ConditionVisualDepSerialization)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringValidatorDepSerialization)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolValidatorDepSerialization)
 
 Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Dependencies, RangeValidatorDepSerialization, T)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, DependencySerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, NumberVisualDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolVisualDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringVisualDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, ConditionVisualDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolValidatorDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringValidatorDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, RangeValidatorDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, NumArrayLengthDepSerializationExceptions)
 
 Teuchos::TEUCHOS_UNIT_TEST (Teuchos_Dependencies, DepSheetTests)
 

Macro Definition Documentation

#define BASIC_DEPENDENCY_TEST (   DEPENDENCY,
  DEPTYPE,
  NUM_DEPENDEES,
  NUM_DEPENDENTS 
)
Value:
std::string depXMLTag##DEPENDENCY = \
DummyObjectGetter< DEPTYPE >::getDummyObject()->getTypeAttributeValue(); \
TEST_ASSERT(DEPENDENCY->getTypeAttributeValue() == depXMLTag##DEPENDENCY ); \
TEST_ASSERT(DEPENDENCY->getDependents().size() == NUM_DEPENDENTS); \
TEST_ASSERT(DEPENDENCY->getDependees().size() == NUM_DEPENDEES); \
#define TEST_ASSERT(v1)
Assert the given statement is true.

Definition at line 34 of file Dependencies_SerializationTests.cpp.

#define VERIFY_DEPENDENT (   DEPENDENCY,
  DEPENDENT 
)
Value:
DEPENDENCY->getDependents().find(DEPENDENT) \
!= \
DEPENDENCY->getDependents().end() \
); \
#define TEST_ASSERT(v1)
Assert the given statement is true.

Definition at line 43 of file Dependencies_SerializationTests.cpp.

#define VERIFY_DEPENDEE (   DEPENDENCY,
  DEPENDEE 
)
Value:
DEPENDENCY->getDependees().find(DEPENDEE) \
!= \
DEPENDENCY->getDependees().end()); \
#define TEST_ASSERT(v1)
Assert the given statement is true.

Definition at line 50 of file Dependencies_SerializationTests.cpp.

#define CREATE_DEPENDEE (   POSTFIX,
  VALUE 
)
Value:
RCP<ParameterEntry> dependeeParam##POSTFIX = rcp( \
new ParameterEntry( VALUE ));
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 56 of file Dependencies_SerializationTests.cpp.

#define CREATE_DEPENDENT (   POSTFIX,
  VALUE 
)
Value:
RCP<ParameterEntry> dependentParam##POSTFIX = \
rcp(new ParameterEntry( VALUE )); \
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 60 of file Dependencies_SerializationTests.cpp.

#define EXCEPTION_TEST_BOILERPLATE (   DEPENDEE_VAL,
  DEPENDENT_VAL 
)
Value:
CREATE_DEPENDEE(1, DEPENDEE_VAL); \
CREATE_DEPENDEE(Extra, DEPENDEE_VAL); \
CREATE_DEPENDENT(1, DEPENDENT_VAL); \
\
XMLParameterListWriter::EntryIDsMap writerEntryMap; \
writerEntryMap[dependeeParam1] = 1; \
writerEntryMap[dependentParam1] = 2; \
writerEntryMap[dependeeParamExtra] = 3; \
ValidatortoIDMap writerValiMap; \
\
XMLParameterListReader::EntryIDsMap readerEntryMap; \
readerEntryMap[1] = dependeeParam1; \
readerEntryMap[2] = dependentParam1; \
readerEntryMap[3] = dependeeParamExtra; \
IDtoValidatorMap readerValiMap; \
#define CREATE_DEPENDEE(POSTFIX, VALUE)
#define CREATE_DEPENDENT(POSTFIX, VALUE)

Definition at line 64 of file Dependencies_SerializationTests.cpp.

#define CONVERT_DEP_TO_XML (   DEPENDENCY)
Value:
XMLObject DEPENDENCY##XML = DependencyXMLConverterDB::convertDependency( \
DEPENDENCY , writerEntryMap, writerValiMap); \

Definition at line 81 of file Dependencies_SerializationTests.cpp.

#define TOO_MANY_DEPENDEE_TEST (   DEPENDENCY)
Value:
XMLObject extraDependee(DependencyXMLConverter::getDependeeTagName()); \
extraDependee.addAttribute<ParameterEntry::ParameterEntryID>( \
DependencyXMLConverter::getParameterIdAttributeName(), \
writerEntryMap[dependeeParamExtra]); \
XMLObject tooManyTempXML = DEPENDENCY##XML.deepCopy(); \
tooManyTempXML.addChild(extraDependee); \
DependencyXMLConverterDB::convertXML( \
tooManyTempXML , readerEntryMap, readerValiMap), \
TooManyDependeesException); \
#define TEST_THROW(code, ExceptType)
Assert that the statement &#39;code&#39; throws the exception &#39;ExceptType&#39; (otherwise the test fails)...

Definition at line 85 of file Dependencies_SerializationTests.cpp.

#define COPY_DEPTAG_WITHOUT_CHILD (   TAG,
  CHILDTAG,
  NEWTAG 
)
Value:
XMLObject NEWTAG(TAG.getTag()); \
NEWTAG.addAttribute( \
DependencyXMLConverter::getTypeAttributeName(), \
TAG.getAttribute(DependencyXMLConverter::getTypeAttributeName())); \
for(int i =0; i< TAG.numChildren(); i++){ \
if(TAG.getChild(i).getTag() != CHILDTAG) \
{ \
NEWTAG.addChild(TAG.getChild(i).deepCopy()); \
} \
} \

Definition at line 98 of file Dependencies_SerializationTests.cpp.

#define INSERT_VALIDATOR_TO_MAPS (   VALIDATOR)
Value:
writerValiMap.insert( VALIDATOR ); \
readerValiMap.insert( \
IDtoValidatorMap::IDValidatorPair( \
writerValiMap.find( VALIDATOR )->second, VALIDATOR )); \

Definition at line 111 of file Dependencies_SerializationTests.cpp.

#define NUMBER_VIS_TEST (   T)
Value:
Teuchos_Dependencies, NumberVisualDepSerialization, T)
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, TYPE)
Instantiate a templated unit test with one template parameter.

Definition at line 380 of file Dependencies_SerializationTests.cpp.

#define ArrayModifierTest (   DEPENDENCYTYPE,
  ARRAY_TYPE 
)

Definition at line 491 of file Dependencies_SerializationTests.cpp.

#define NUM_ARRAY_LENGTH_TEST (   DependeeType,
  DependentType 
)
Value:
Teuchos_Dependencies, \
NumberArrayLengthDependency_serialization_tests, \
DependeeType, \
DependentType)
#define TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2)
Instantiate a templated unit test with two template parameters.

Definition at line 581 of file Dependencies_SerializationTests.cpp.

#define NUM_ARRAY_LENGTH_TEST_GROUP (   DependeeType)
Value:
NUM_ARRAY_LENGTH_TEST(DependeeType, int) \
NUM_ARRAY_LENGTH_TEST(DependeeType, float) \
NUM_ARRAY_LENGTH_TEST(DependeeType, double) \
#define NUM_ARRAY_LENGTH_TEST(DependeeType, DependentType)

Definition at line 592 of file Dependencies_SerializationTests.cpp.

#define TWODROW_TEST (   DependeeType,
  DependentType 
)
Value:
Teuchos_Dependencies, \
TwoDRowDependency_serialization_tests, \
DependeeType, \
DependentType)
#define TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2)
Instantiate a templated unit test with two template parameters.

Definition at line 603 of file Dependencies_SerializationTests.cpp.

#define TWODROW_TEST_GROUP (   DependeeType)
Value:
TWODROW_TEST(DependeeType, int) \
TWODROW_TEST(DependeeType, float) \
TWODROW_TEST(DependeeType, double) \
TWODROW_TEST(DependeeType, llint)
#define TWODROW_TEST(DependeeType, DependentType)

Definition at line 614 of file Dependencies_SerializationTests.cpp.

#define TWODCOL_TEST (   DependeeType,
  DependentType 
)
Value:
Teuchos_Dependencies, \
TwoDColDependency_serialization_tests, \
DependeeType, \
DependentType)
#define TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2)
Instantiate a templated unit test with two template parameters.

Definition at line 625 of file Dependencies_SerializationTests.cpp.

#define TWODCOL_TEST_GROUP (   DependeeType)
Value:
TWODCOL_TEST(DependeeType, int) \
TWODCOL_TEST(DependeeType, float) \
TWODCOL_TEST(DependeeType, double) \
TWODCOL_TEST(DependeeType, llint)
#define TWODCOL_TEST(DependeeType, DependentType)

Definition at line 636 of file Dependencies_SerializationTests.cpp.

#define RANGE_VALIDATOR_TEST (   T)
Value:
Teuchos_Dependencies, RangeValidatorDepSerialization, T)
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, TYPE)
Instantiate a templated unit test with one template parameter.

Definition at line 988 of file Dependencies_SerializationTests.cpp.