text
stringlengths 0
2.2M
|
---|
{
|
typedef bsl::string Type;
|
Type object;
|
MyManipulator manip;
|
ASSERT(bdlat_TypeCategory::e_SIMPLE_CATEGORY
|
== bdlat_TypeCategoryUtil::
|
manipulateByCategory(&object, manip));
|
}
|
{
|
typedef bsl::vector<char> Type;
|
Type object;
|
MyManipulator manip;
|
ASSERT(bdlat_TypeCategory::e_ARRAY_CATEGORY
|
== bdlat_TypeCategoryUtil::
|
manipulateByCategory(&object, manip));
|
}
|
{
|
typedef MyDeclaredDynamicType Type;
|
Type object;
|
MyManipulator manip;
|
object.makeChoice();
|
int catchoice = bdlat_TypeCategoryUtil::
|
manipulateByCategory(&object, manip);
|
ASSERT(bdlat_TypeCategory::e_CHOICE_CATEGORY == catchoice);
|
object.makeSequence();
|
int catseq = bdlat_TypeCategoryUtil::
|
manipulateByCategory(&object, manip);
|
ASSERT(bdlat_TypeCategory::e_SEQUENCE_CATEGORY == catseq);
|
}
|
{
|
typedef MyAutoDetectDynamicType Type;
|
Type object;
|
MyManipulator manip;
|
object.makeSequence();
|
ASSERT(bdlat_TypeCategory::e_SEQUENCE_CATEGORY
|
== bdlat_TypeCategoryUtil::
|
manipulateByCategory(&object, manip));
|
object.makeNullableValue();
|
ASSERT(bdlat_TypeCategory::e_NULLABLE_VALUE_CATEGORY
|
== bdlat_TypeCategoryUtil::
|
manipulateByCategory(&object, manip));
|
}
|
if (verbose) cout << "\nEnd of test." << endl;
|
} break;
|
case 4: {
|
// --------------------------------------------------------------------
|
// TESTING 'access<Category>' FUNCTIONS
|
//
|
// Concerns:
|
//
|
// Plan:
|
//
|
// Testing:
|
// --------------------------------------------------------------------
|
if (verbose) cout << "\nTESTING 'acess<Category>' FUNCTIONS"
|
<< "\n============= " << endl;
|
{
|
typedef MyArrayType Type;
|
Type object;
|
MyAccessor accessor;
|
ASSERT(bdlat_TypeCategory::e_ARRAY_CATEGORY
|
== bdlat_TypeCategoryFunctions::
|
accessArray(object, accessor));
|
ASSERT(-1 == bdlat_TypeCategoryFunctions::
|
accessChoice(object, accessor));
|
ASSERT(-1 == bdlat_TypeCategoryFunctions::
|
accessCustomizedType(object, accessor));
|
ASSERT(-1 == bdlat_TypeCategoryFunctions::
|
accessEnumeration(object, accessor));
|
ASSERT(-1 == bdlat_TypeCategoryFunctions::
|
accessNullableValue(object, accessor));
|
ASSERT(-1 == bdlat_TypeCategoryFunctions::
|
accessSequence(object, accessor));
|
ASSERT(-1 == bdlat_TypeCategoryFunctions::
|
accessSimple(object, accessor));
|
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.