Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes | Static Private Attributes
nsTestLog Class Reference

A Logging class for test programs. More...

Collaboration diagram for nsTestLog:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void AddTrace (char *aTrace)
void DelTrace (char *aTrace)
void PrintError (char *aCall, int aError)
void PrintError (char *aCall, char *aMessage)

Private Attributes

nsCAutoString mTrace

Static Private Attributes

static const char * kTraceDelimiter = "."

Detailed Description

A Logging class for test programs.

This simple test program will not trigger a component registration. So Mozilla has to be run once before running this, so that the necessary components will be registered. Also, please observe that the ContractID's are case sensitive now!

28/Mar/2000

Author:
Catalin Rotaru [CATA]

Definition at line 69 of file TestUConv.cpp.


Member Function Documentation

void nsTestLog::AddTrace ( char *  aTrace)

Definition at line 181 of file TestUConv.cpp.

{
  mTrace.Append(aTrace);
  mTrace.Append(kTraceDelimiter);
}

Here is the caller graph for this function:

void nsTestLog::DelTrace ( char *  aTrace)

Definition at line 187 of file TestUConv.cpp.

{
  mTrace.Truncate(mTrace.Length() - strlen(aTrace) - strlen(kTraceDelimiter));
}

Here is the caller graph for this function:

void nsTestLog::PrintError ( char *  aCall,
int  aError 
)

Definition at line 192 of file TestUConv.cpp.

{
  const char * trace = mTrace.get();
  printf("ERROR at %s%s code=0x%x.\n", trace, aCall, aError);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsTestLog::PrintError ( char *  aCall,
char *  aMessage 
)

Definition at line 198 of file TestUConv.cpp.

{
  const char * trace = mTrace.get();
  printf("ERROR at %s%s reason: %s.\n", trace, aCall, aMessage);
}

Here is the call graph for this function:


Member Data Documentation

const char * nsTestLog::kTraceDelimiter = "." [static, private]

Definition at line 73 of file TestUConv.cpp.

Definition at line 75 of file TestUConv.cpp.


The documentation for this class was generated from the following file: