To write out diagonostic text from a test, use the member function outputTextStream, which recognizes the standard C++ << operator for all built-in types. Text output produced with outputTextStream displays to the console and is also saved in a ITieredTextBuffer within the test. You can the log the test, including the text buffer. If a test fails, you can retieve the associated diagnostic text to determine the cause of the failure.
outputTestStream returns a pointer to a ITieredTextBuffer object that contains the text. Objects of the class ITieredTextBuffer act like C++ ostream objects. They support << operators for all built-in types.
ITieredTextBuffer has some additional functionality beyond that of ostream to support retrieving textual information for later analysis. Information is marked with a level of importance. This permits showing a little or a lot of detail when the text is printed.
Most text occupies the tier kNormal. Important information that should not be missed occupies tier kGeneral or kHeadline. Detailed information that can usually be ignored occupies tier kDetail or kDebug.
This is a list of available tiers in order of least detailed to most detailed:
kTop: Most general information
kHeadline: One-line information
kGeneral: General interest
kNormal: Default
kDetail: Detail not usually needed
kDebug: Only needed during debugging
kBottom: Lowest tier, most detailed
Constructors & DestructorClass constructors and destructors.
![]() |
public:
virtual ~ITieredTextBuffer()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
ITieredTextBuffer(const ITieredTextBuffer&)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
ITieredTextBuffer()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Assignment OperatorsStandard assignment operators.
![]() |
public:
ITieredTextBuffer& operator =(const ITieredTextBuffer&)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Echo and Output ConfigurationMember functions used to control the output buffer appearance and configuration.
![]() |
public:
ETier echoTier() const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
unsigned short indent() const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
void openLog(const char* logFileName)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
ETier popTier()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
void pushTier(ETier newTier)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
void setEchoTier(ETier)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
unsigned short setIndent(unsigned short)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
unsigned short setRelativeIndent(short)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
ETier setTier(ITieredTextBuffer::ETier newTier)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
ETier tier() const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Standard C++ << OperatorsStandard output operators for use with ITieredTextBuffers.
![]() |
public:
virtual ITieredTextBuffer& operator <<(const char*)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const long)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const double)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const unsigned char)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const char)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const unsigned int)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<( const unsigned short )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const unsigned long)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const signed char)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const short)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const int)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const long double)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(const float)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual ITieredTextBuffer& operator <<(endlfn)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
enum ETier { kTop=0,
kHeadline=0x10,
kGeneral=0x20,
kEphemeral=0x2F,
kNormal=0x30,
kDetail=0x40,
kDebug=0x50,
kBottom=0x5F }kTop - Top tier, most general information kHeadline - One-liner information kGeneral - Information of general interest kEphemeral - Only shows on screen; not saved ' kNormal - Default tier kDetail - Detailed information not usually needed kDebug - Information only needed during debugging kBottom - Lowest tier, most detailed information
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
typedef ITieredTextBuffer & ( * endlfn ) ( ITieredTextBuffer & )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |